Skip to content
/ t411cli Public
forked from Xide/t411cli

T411 command line wrapper and API made in python

License

Notifications You must be signed in to change notification settings

sinc59/t411cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T411 CLI

Join the chat at https://gitter.im/Xide/t411cli

PyPi Travis-CI

t411cli is a lightweight command line interface / API for T411 written in Python.

Interface


Installation

t411cli require t411api, but pip will install it for you.

You may need to prefix pipX / pythonX commands with sudo

Compatibility

This code is developped with Python 3.5 but sould be compatible with Python >= 3.2

PyPI package: easy way

# latest release
pip3 install t411cli
# or upstream version
pip3 install git+https://[email protected]/Xide/t411cli

Manual way

# upstream version
git clone [email protected]:Xide/t411cli.git && cd t411cli
python3 ./setup.py install

Use this method if you want the latest (maybe less stable) updates.


Quick Start

At first run, the soft will ask for your T411 credentials, simply type them once and they will be stored under /home/$USER/.config/t411cli.conf (See Configuration section for more details.)

Note: You can override configuration path with -c | --configuration command line option

t411cli main commands:

search Command used to browse available torrents.

details Get details for a specific torrent.

download Download selected torrent to filesystem.

top Retreive top torrents

user Get infos about a t411 user.

bookmark Bookmarks management

If you want more details about a command usage, you can use the following help pages:

t411 command -h

Search for a torrent

You can browse T411 by by simply typing:

t411 search 'torrent name'

The 10 best matches (ordered by number of seeders) will be shown, if you want to change this number, you can just set the --limit | -l argument like so:

t411 -l 50      search 'torrent name' # OR
t411 --limit 50 search 'torrent name' # Both command will give the same results

Or you can just browse in the most popular torrents:

t411 top [100|day|week|month]
Filter results by category

Name of categories can be retreived using t411 categories command. You can then filter results of a query with download -c argument like so:

t411 search archlinux -c application/linux

Will fetch only the results for 'archlinux' under linux application category.

Sort torrents

The search and top features handle sorting options:

t411 search "query" seed desc # Sort result by number of seeders (default behaviour)
t411 top day size asc # Less heavy torrents of the day

search options are:

  • size
  • seed
  • leech
  • download

You can order sorting with asc or desc specifier.

Those commands will yield a list of torrents, To use the other commands, please be sure to note the torrent ID displayed.

Warning: as T411 API does not provide sorting capabilities, we must fetch the entire list of torrent,
so short search query like 'a' can be VERY SLOW ( or timeout, with 524 HTTP code )

Download a torrent

In order to download a torrent, you must have his ID;

t411 download TORRENT_ID

You can specify a command to launch on download completion, for example:

t411 download TORRENT_ID --cmd 'qbittorrent %torrent'

Will open the corresponding torrent in qbittorrent.

Note The special keyword %torrent can be used in --cmd option to refer to the completed torrent file.

By default, your torrent file will be stored under /home/$USER/Downloads directory, see Configuration section to change this behaviour.

Get user infos

User infos are available from the command line using t411 user command.

By default, your user infos will be fetched, but you can also specify a user id:

t411 user USER_ID

Manage bookmarks

You can use your t411 bookmarks directly from the command line using the t411 bookmark command.

this command will yield a list of all your bookmarked torrents, you can add or delete existing bookmarks with the t411 bookmark add TORRENT_ID and t411 bookmark del TORRENT_ID subcommands.


Configuration

By default, your configuration will be loaded or stored from: /home/$USER/.config/t411cli.conf You can also put a global configuration in the /etc/t411cli.conf file

The tool configuration is split in two parts:

Account

Section containing account information : username and password

Warning: T411 credentials will be stored on your file system unencrypted, you might want to use -p command line argument instead if you are using this soft on a public computer.

Config

Section for software configuration

  • limit

    Maximum number of torrent that can be fetched in a single request

  • torrent_folder

    The tool will download torrent files in this folder


FAQ

Getting a ServiceError on program startup:

This error is usually used when T411 is unreachable or encounter an unknown problem, check for API status If this service is up, please contact a project developer

Getting an import error at program starting:

Some dependencies may have changed, try to run pip install -r requirements.txt to refresh dependency list


Developers

Hi, wanna join us ? Glad to hear that ! You can start browse the code, we are trying to comment a lot, especially for TODO's. Or you can try to improve one of theses :

- Test coverage
- Command line utilities
- Windows compatibility

About

T411 command line wrapper and API made in python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%