t411-console/README.md

405 lines
10 KiB
Markdown
Raw Permalink Normal View History

2015-02-09 23:42:04 +01:00
# t411-console
2015-02-10 13:55:33 +01:00
2015-08-15 18:40:22 +02:00
t411-console provides a console line tool for searching torrents on the tracker t411.me.
2015-02-10 13:55:33 +01:00
2015-02-23 10:10:20 +01:00
You also can configure a transmission remote access and run a download.
2015-08-15 18:40:22 +02:00
![t411-console](https://upload.deblan.org/u/2015-08/55cf6b3b.jpg "t411-console")
2015-02-10 13:55:33 +01:00
## Installation
2015-02-10 14:12:21 +01:00
PHP 5.5 is required
2015-02-10 13:55:33 +01:00
```bash
$ git clone https://github.com/simmstein/t411-console.git
$ cd t411-console
$ curl -sS https://getcomposer.org/installer | php
$ ./composer.phar install
$ ./console
```
2015-02-10 20:25:01 +01:00
2015-09-17 16:13:52 +02:00
If you have an error like `"Fatal error: Call to undefined function Symfony\Component\Yaml\ctype_digit() in /mnt/Apps/t411-console/vendor/symfony/yaml/Inline.php on line 124`, install the missing php module (eg: `php5-ctype`).
2015-02-10 20:25:01 +01:00
## Commands
2015-02-11 16:13:07 +01:00
### Show a user's profile
```
Usage:
users:profile [-i|--id="..."]
Options:
--id (-i) The user id
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
users:profile
2015-02-11 16:19:22 +01:00
Show a user's profile (default: auhentificated user).
2015-02-11 16:13:07 +01:00
Usage: users:profile [OPTIONS]
2015-02-11 16:14:28 +01:00
```
2015-02-11 16:13:07 +01:00
2015-02-10 20:29:55 +01:00
### Login on t411
2015-02-10 20:25:01 +01:00
```
Usage:
auth:login
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
auth:login
Generate the config to access the API. You must have a valid login/password.
The login and the password are not saved.
Usage: auth:login
```
2015-02-10 20:29:55 +01:00
### Show categories and sub-categories
2015-02-10 20:25:01 +01:00
```
Usage:
categories:tree
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
categories:tree
List all categories and sub-categories with IDs.
Usage: categories:tree
```
2015-02-10 20:29:55 +01:00
### Show a torrent details
2015-02-10 20:25:01 +01:00
```
Usage:
torrents:details id
Arguments:
id Torrent ID
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
torrents:details
Show torrent details.
Usage: torrents:details TORRENT_ID
```
2015-02-10 20:29:55 +01:00
### Download a torrent
2015-02-10 20:25:01 +01:00
```
Usage:
torrents:download id output_file
Arguments:
id Torrent ID
output_file Output
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
torrents:download
Download a torrent.
Usage: torrents:download TORRENT_ID OUTPUT
OUTPUT could be a file or STDIN by using -.
```
2015-02-10 20:29:55 +01:00
### Search torrents
2015-02-10 20:25:01 +01:00
```
Usage:
torrents:search [-o|--offset="..."] [-l|--limit="..."] [-s|--sub-category="..."] [-c|--category="..."] [-t|--terms="..."] query
Arguments:
query Query
Options:
--offset (-o) Page number
--limit (-l) Number of results per page
--sub-category (-s) Filter by sub-category ID
--category (-c) Filter by category ID
--terms (-t) Filter by terms IDs (separated by ",")
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
torrents:search
Search torrents.
Usage: torrents:search QUERY [OPTIONS]
2015-11-18 20:53:37 +01:00
Sort values \"seed\", \"leech\", \"size\", \"name\", \"id\"
2015-02-10 20:25:01 +01:00
--terms does not work (API bug)
```
2015-02-10 20:29:55 +01:00
### Search movies
2015-02-10 20:25:01 +01:00
```
Usage:
torrents:search:movies [-o|--offset="..."] [-l|--limit="..."] [-t|--terms="..."] query
Arguments:
query Query
Options:
--offset (-o) Page number
--limit (-l) Number of results per page
--terms (-t) Filter by terms IDs (separated by ",")
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
torrents:search:movies
Search movies.
Usage: torrents:search:movies QUERY [OPTIONS]
--terms does not work (API bug)
```
2015-02-10 20:29:55 +01:00
### Search series
2015-02-10 20:25:01 +01:00
```
Usage:
torrents:search:series [-o|--offset="..."] [-l|--limit="..."] [-t|--terms="..."] query
Arguments:
query Query
Options:
--offset (-o) Page number
--limit (-l) Number of results per page
--terms (-t) Filter by terms IDs (separated by ",")
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
torrents:search:series
Search series.
Usage: torrents:search:series QUERY [OPTIONS]
--terms does not work (API bug)
```
2015-02-10 20:29:55 +01:00
### Top torrents
2015-02-10 20:25:01 +01:00
```
Usage:
torrents:top [-p|--period="..."]
Options:
--period (-p) Period
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
torrents:top
Show top torrents.
Usage: torrents:search:top [OPTIONS]
2015-11-18 20:53:37 +01:00
Period values \"100\" (default), \"day\", \"week\", \"month\"
Sort values \"seed\", \"leech\", \"size\", \"name\", \"id\"
2015-02-10 20:25:01 +01:00
```
2015-02-10 20:29:55 +01:00
### Show types and terms
2015-02-10 20:25:01 +01:00
```
Usage:
types:tree [-t|--terms] [-f|--filter[="..."]]
Options:
--terms (-t) Show terms
--filter (-f) Filter types by ID or by name
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
types:tree
List all types of terms and terms.
Usage: types:tree [OPTIONS]
```
2015-02-23 10:07:17 +01:00
### Configure transmission web remote access
```
Usage:
transmission:configure
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
transmission:configure
Configure your transmission web remote access.
Usage: transmission:configure
```
### Download a torrent with transmission web remote client
```
Usage:
transmission:download id
Arguments:
id Torrent ID
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Help:
transmission:download
Download a torrent.
Usage: transmission:download TORRENT_ID
```
2016-05-09 23:12:10 +02:00
### Get stats of the transmission server
```
Usage:
transmission:stats
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
transmission:stats
Stats of the transmission server.
Usage: transmission:stats
```
2015-08-15 18:35:06 +02:00
### UserScript
2015-02-10 20:25:01 +01:00
2015-08-15 18:36:52 +02:00
![UserScript](https://upload.deblan.org/u/2015-08/55cf6a91.png "UserScript")
2015-08-15 18:35:06 +02:00
```
// ==UserScript==
// @name Tranmission cli cmd
// @namespace t411
2016-05-09 23:12:10 +02:00
// @include http*://www.t411.ch/torrents/*
2015-08-15 18:35:06 +02:00
// @version 1
// @grant none
// ==/UserScript==
$('.btn').each(function() {
var $btn = $(this);
var $parent = $btn.parent();
if ($btn.attr('href').indexOf('download') !== -1) {
var id = $btn.attr('href').split('=')[1];
$parent.append('<p>t411-console transmission:download ' + id + '</p>');
}
});
```