# shooter

> fetch subtitle from shooter.cn

Latest version **0.0.8** (published 2015-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install shooter
pnpm add shooter
yarn add shooter
bun add shooter
```

Provides the command `shooter`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2015-03-04 |
| First published | 2014-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | zyxar |
| Maintainers | zyxar |
| Keywords | subtitle, shooter |

## Links

- npm: https://www.npmjs.com/package/shooter
- Repository: https://github.com/zyxar/shooter.js
- Issues: https://github.com/zyxar/shooter/issues
- npm.io page: https://npm.io/package/shooter

## Recent versions

- 0.0.8 (latest) — 2015-03-04
- 0.0.7 — 2015-01-19
- 0.0.6 — 2015-01-08
- 0.0.5 — 2014-05-18
- 0.0.4 — 2014-03-29
- 0.0.3 — 2014-03-29
- 0.0.2 — 2014-03-28
- 0.0.1 — 2014-03-24

## README

shooter.js
==========

fetch subtitle from shooter.cn

## Install

- via `npm`:

  ```
  npm install -g shooter
  ```
  
- via `git`:

  ```
  git clone https://github.com/zyxar/shooter.js
  cd shooter.js/
  npm install -g
  ```


## Example 

```js
var Fn = require('..').API.fetch;
var path = require('path');

var args = process.argv;
// argv[0] === 'node'
// argv[1] === 'XXX/bin/main.js'
args = args.slice(2);

args.map(function (current, index, array) {
  Fn(current, function(err, res) {
    if (!err) {
      console.log(path.basename(current), '->', res);
    } else {
      console.log(err);
    }
  });
});
```

## Funcs

- `API.getHash(file)`

  - return `string` or `null`;
  - get four slice (4096) md5 hash values;

- `API.submit(callback)`

  - should be called after `getHash()`;
  - get subtitle information of the film file;
  - `callback(error, list)`, list is supposed to be an array with each element a metadata of a subtitle file;

- `API.fetch(file, callback)`

  - all-in-one

## Class

- `FilmFile`:

  ```js
  function FilmFile (fullpath) {/*...*/};
  FilmFile.prototype.parse = function(fullpath) {/*...*/};
  FilmFile.prototype.fetch = function(callback) {/*...*/};
  ```

## Note

- basic support for `http_proxy` or `HTTP_PROXY`;

---
_Source: https://npm.io/package/shooter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
