Пример #1
0
    protected function configure()
    {
        parent::configure();
        $this->setName('torrent-remove')->setAliases(['tr'])->setDescription('Remove torrents')->addArgument('torrent-ids', InputArgument::IS_ARRAY, 'List of torrent ids for remove')->addOption('soft', null, InputOption::VALUE_NONE, 'Remove only from Transmission, not delete data')->addOption('yes', 'y', InputOption::VALUE_NONE, 'Don\'t ask confirmation')->setHelp(<<<EOT
## Remove torrents

Torrents removes only by id, you can see torrent id in `torrent-list` output.

By default torrents removes with data! Data deletes to trash on Mac OS and totally removes on Windows!

Remove one torrent:
```
transmission-cli torrent-remove 1
```

Remove several torrents:
```
transmission-cli torrent-remove 1 2
```

Remove only torrent from transmission, not delete data:
```
transmission-cli torrent-remove 1 --soft
```

For select not popular torrents and remove it, see `transmission-cli stats-get --help`
EOT
);
    }
Пример #2
0
    protected function configure()
    {
        parent::configure();
        $this->setName('weburg-download')->setAliases(['wd'])->setDescription('Download torrents from weburg.net')->addOption('download-torrents-dir', null, InputOption::VALUE_OPTIONAL, 'Torrents destination directory')->addOption('days', null, InputOption::VALUE_OPTIONAL, 'Max age of series torrent')->addOption('popular', null, InputOption::VALUE_NONE, 'Download only popular')->addOption('series', null, InputOption::VALUE_NONE, 'Download only tracked series')->addArgument('movie-id', null, 'Movie ID or URL')->setHelp(<<<EOT
## Download torrents from Weburg.net

You can automatically download popular torrents from http://weburg.net/movies/new out of the box, use command:
```
transmission-cli weburg-download --download-torrents-dir=/path/to/torrents/directory
```

or define `download-torrents-dir` in config and just:
```
transmission-cli weburg-download
```

You can automatically download new series, for add series to tracked list see `transmission-cli weburg-series-add`.
It is pretty simple:
```
transmission-cli weburg-series-add http://weburg.net/series/info/12345
```

After that command `weburg-download` also will download series from list for last day.
If you don't want to download popular torrents, but only new series, use command:
```
transmission-cli weburg-download --download-torrents-dir=/path/to/torrents/directory --series
```

## Add downloaded torrents to Transmission

After download all torrents, command call `torrent-add` command for each transmission-host from config.
If was defined `--transmission-host` option, then `torrent-add` will called only for this host.
EOT
);
    }
Пример #3
0
    protected function configure()
    {
        parent::configure();
        $this->setName('_docs')->setDescription('Generate docs for README.md')->setHelp(<<<EOT
Developer command for generate docs in markdown. Typically usage:
```
bin/transmission-cli _docs > docs/commands.md
```
EOT
);
    }
Пример #4
0
    protected function configure()
    {
        parent::configure();
        $this->setName('stats-send')->setAliases(['ss'])->setDescription('Send metrics to InfluxDB')->addOption('transmission-host', null, InputOption::VALUE_OPTIONAL, 'Transmission host')->setHelp(<<<EOT
## Send statistic to InfluxDB

Command should called every hour or more, possible every day, but it will less precise.

Command assume that all torrents have unique names.

You should to configure InfluxDB to use this functional.
EOT
);
    }
Пример #5
0
    protected function configure()
    {
        parent::configure();
        $this->setName('torrent-add')->setAliases(['ta'])->setDescription('Add torrents to Transmission')->addArgument('torrent-files', InputArgument::IS_ARRAY, 'List of torrent files to add')->setHelp(<<<EOT
## Add torrents

By default, Transmission may to freeze if you add several torrents at same time.
Therefore, preferred way to add torrents - with `torrent-add`.
After each add file command sleeps for 10 seconds for give time to freeze Transmission.
After that command waits for Transmission answer and add next file, etc.

```
transmission-cli torrent-add file|url [file2] [fileX]
```
EOT
);
    }
    protected function configure()
    {
        parent::configure();
        $this->setName('torrent-remove-duplicates')->setAliases(['trd'])->setDescription('Remove duplicates obsolete torrents')->setHelp(<<<EOT
## Remove series torrent duplicates

While download series every time you add torrent with same name to Transmission.
It corrupts `stats-send` command, therefore we need to remove old torrents. This command doing this.

Just call:
```
transmission-cli torrent-remove-duplicates
```

Command removes all torrents with same name and same download directory from Transmission.
**It not removes any files!**
EOT
);
    }
Пример #7
0
    protected function configure()
    {
        parent::configure();
        $this->setName('weburg-series-add')->setAliases(['wsa'])->setDescription('Add series to monitoring list')->addArgument('series-id', null, 'series id or series url')->setHelp(<<<EOT
## Add series to download list

You can automatically download new series. To do this, you should add series to download list:
```
transmission-cli weburg-series-add http://weburg.net/series/info/12345
```

After that command `weburg-download` also will download series from list for last day.
If you don't want to download popular torrents, but only new series, use command:
```
transmission-cli weburg-download --series
```
EOT
);
    }
Пример #8
0
    protected function configure()
    {
        parent::configure();
        $this->setName('stats-get')->setAliases(['sg'])->setDescription('Get metrics from InfluxDB')->addOption('name', null, InputOption::VALUE_OPTIONAL, 'Sort by torrent name (regexp)')->addOption('age', null, InputOption::VALUE_OPTIONAL, 'Sort by torrent age, ex. \'>1 <5\'')->addOption('profit', null, InputOption::VALUE_OPTIONAL, 'Filter by profit')->addOption('days', null, InputOption::VALUE_OPTIONAL, 'Show stats for last days', 7)->addOption('sort', null, InputOption::VALUE_OPTIONAL, 'Sort by column number', 4)->addOption('limit', null, InputOption::VALUE_OPTIONAL, 'Limit torrent list')->addOption('rm', null, InputOption::VALUE_NONE, 'Remove filtered torrents')->addOption('soft', null, InputOption::VALUE_NONE, 'Remove only from Transmission, not delete data')->addOption('yes', 'y', InputOption::VALUE_NONE, 'Don\'t ask confirmation')->addOption('transmission-host', null, InputOption::VALUE_OPTIONAL, 'Transmission host')->setHelp(<<<EOT
## Get torrents stats from InfluxDB

Command `stats-get` almost same as `torrent-list`, but it use InfluxDB:
```
transmission-cli stats-get [--name='name'] [--age='age'] [profit='>0'] [--days=7] [--sort=1] [--limit=10] [--rm]
```

You can also use `--name`, `--age`, `--sort`, `--limit`, plus `--profit` and `--days` options.

Profit = uploaded for period / torrent size. Profit metric more precise than uploaded ever value.

Show 10 worst torrents for last week:
```
transmission-cli stats-get --days 7 --profit '=0' --limit 10
```

Show stats of last added torrents sorted by profit:
```
transmission-cli stats-get --days 1 --age '<2' --sort='-7'
```


## Remove torrents

You can use command `stats-get` with `--rm` option to remove filtered unpopular torrents:
```
transmission-cli stats-get --days 7 --profit '=0' --rm
```

With `--rm` option you can use all options of `torrent-remove` command: `--soft`, `--dry-run`, `-y`.  

Without `-y` option command ask your confirmation for remove torrents.  

If you don't want to remove all filtered torrents, you can save ids of torrents and call `torrent-remove` manually.
EOT
);
    }
Пример #9
0
    protected function configure()
    {
        parent::configure();
        $this->setName('torrent-list')->setAliases(['tl'])->setDescription('List torrents')->addOption('name', null, InputOption::VALUE_OPTIONAL, 'Sort by torrent name (regexp)')->addOption('age', null, InputOption::VALUE_OPTIONAL, 'Sort by torrent age, ex. \'>1 <5\'')->addOption('sort', null, InputOption::VALUE_OPTIONAL, 'Sort by column number', 4)->addOption('limit', null, InputOption::VALUE_OPTIONAL, 'Limit torrent list')->setHelp(<<<EOT
## List torrents

You can list torrents from transmission with `torrent-list` command:
```
transmission-cli torrent-list [--sort=column_number] [--name='name'] [--age='>0'] [--limit=10]
```

**List columns:**

- Name
- Id - need for `torrent-remove` command
- Age - days from torrent done date
- Size - size of downloaded data
- Uploaded - size of uploaded data
- Per day - average uploaded GB per day


#### Sorting list

You can sort torrents by `Per day` column and estimate unpopular torrents:
```
transmission-cli torrent-list --sort=6
```

For reverse sort ordering, add `-` to column number:
```
transmission-cli torrent-list --sort=-6
```


#### Filtering torrent list

**By age:**
```
transmission-cli torrent-list --age '>10'
transmission-cli torrent-list --age '< 20'
transmission-cli torrent-list --age '>0 <5'
```

**By name:**
You can use simple regular expression except `.` and `/` symbols.

Filter FullHD series:
```
transmission-cli torrent-list --name 'season*1080*'
```

Filter all mkv and avi:
```
transmission-cli torrent-list --name '.mkv|.avi'
```

#### Limiting torrent list

Output 10 worst torrents:
```
transmission-cli torrent-list --sort=6 --limit 10
```
EOT
);
    }