Tool to maintain transmission (bittorrent) settings, add items from feeds and redis queues
Project description
# trMaid
[](https://caniusepython3.com/project/trmaid)
Looks after your transmission settings, keeps torrents under check and adds them
from feed or redis queue/list.
## About configuration (*~/.trmaid.yaml* file)
### Sections:
transmission:
url: http://127.0.0.1:9091/transmission/rpc
username: transmission
password: transmission
Well that seems self explanatory...
general:
redis: redis://localhost:6379
verify: False
verbose: True
redis is the url to redis, verify is to whether the SSL verification is done and
verbose is for displaying the messages or not ('-v' in arguments overrides it to
True)
session:
alt-speed-enabled: False
blocklist-enabled: True
blocklist-update-interval: 168
blocklist-url: http://list.iblocklist.com/?list=bt_level1
download-dir: /home/path/Downloads
incomplete-dir: /home/path/Downloads/incomplete
....
Here you can define transmissions session-set parameters - every time script
runs, it checks if they match the given parameters here and if they don't,
script will update them with session-set call. Magic variable here is
"blocklist-update-interval". If blocklist-url has been configured and enabled
script will execute the *blocklist-update* request every X hour (168 hours / a
week in examples case).
tracker:
general:
seedRatioLimit = 1.5
seedRatioMode = 1
seedRatioLimited = True
remove-if:
ratio: 0.2
status: stopped
done-time: 18h
with-data: True
This section might include all *torrent-set* parameters + 'remove-if' part. If
there is remove-if present, torrent is removed if it matches the present
conditions: ratio (>=), status and done-time (eg. 1h or 1d for time since
torrent was finished).
tracker:
host.tld:
location: /home/path/Downloads/private-tracker
host2.tld:
location: /home/path/Downloads/random
peer-limit: 10
seedRatioLimit: 5.0
seedRatioMode: 1
seedRatioLimited: True
This is same as *general-tracker*, but is used if announce urls hostname matches it.
Once match is found *general-tracker* and *location:...* sections are skipped. Use
it to set special values to eg. private trackers.
location:
/mnt/movies:
peer-limit: 15
uploadLimit: 20
uploadLimited: True
seedRatioLimit: 1.0
seedRatioMode: 1
seedRatioLimited: True
This special section is identical to *general-tracker* but its parameters here
are only set if torrents download location matches one in the section name. Once
match is found *general-tracker* is skipped.
rss:
http://www.ezrss.it/feed:
download-dir: /home/path/Downloads/tv-shows
peer-limit: 15
downloadLimit: 1024
downloadLimited: False
uploadLimit: 50
uploadLimited: True
seedRatioLimit: 5.0
seedRatioMode: 1
seedRatioLimited: True
trackerAdd:
- udp://tracker.istole.it:80
- udp://tracker.openbittorrent.com:80
- udp://tracker.publicbt.com:80
matches:
- ^some\.regex\.here
- ^and(\-|\s|\.)here
Parameters here are either torrent-add or torrent-set parameters. Previous
example adds torrents from ezrss "FakeShow" feed, adding them to 'tv-shows'
directory and sets peer/download/upload limits. *matches* is a list of regular
expressions - if exists, title has to match one of them.
redis:
list-4-lpop:
peer-limit: 20
uploadLimit: 5
uploadLimited: True
Here torrent urls or magent links are popped (lpop) out of the list "list-4-lpop"
mentioned in section name. Otherwise its the same as *rss:....* section
watch-folders:
/home/user/auto-add-torrents:
peer-limit: 30
uploadLimit: 150
uploadLimited: True
seedRatioLimit: 11.0
seedRatioMode: 1
seedRatioLimited: True
trackerAdd:
- udp://tracker.istole.it:80
If you have "watch-folders" section in your configuration file and that folder
really exists, files with "torrent" extensions are added just as from rss or redis.
After added, they are renamed from "*.torrent" file to "*.torrent.added" file.
You can read more about *session-set*, *torrent-add* and *torrent-set* requests from here:
[transmssion rpc spec ](https://trac.transmissionbt.com/browser/trunk/extras/rpc-spec.txt)
NB! things break, use at your own risk and only download legal stuff! ;)
[](https://caniusepython3.com/project/trmaid)
Looks after your transmission settings, keeps torrents under check and adds them
from feed or redis queue/list.
## About configuration (*~/.trmaid.yaml* file)
### Sections:
transmission:
url: http://127.0.0.1:9091/transmission/rpc
username: transmission
password: transmission
Well that seems self explanatory...
general:
redis: redis://localhost:6379
verify: False
verbose: True
redis is the url to redis, verify is to whether the SSL verification is done and
verbose is for displaying the messages or not ('-v' in arguments overrides it to
True)
session:
alt-speed-enabled: False
blocklist-enabled: True
blocklist-update-interval: 168
blocklist-url: http://list.iblocklist.com/?list=bt_level1
download-dir: /home/path/Downloads
incomplete-dir: /home/path/Downloads/incomplete
....
Here you can define transmissions session-set parameters - every time script
runs, it checks if they match the given parameters here and if they don't,
script will update them with session-set call. Magic variable here is
"blocklist-update-interval". If blocklist-url has been configured and enabled
script will execute the *blocklist-update* request every X hour (168 hours / a
week in examples case).
tracker:
general:
seedRatioLimit = 1.5
seedRatioMode = 1
seedRatioLimited = True
remove-if:
ratio: 0.2
status: stopped
done-time: 18h
with-data: True
This section might include all *torrent-set* parameters + 'remove-if' part. If
there is remove-if present, torrent is removed if it matches the present
conditions: ratio (>=), status and done-time (eg. 1h or 1d for time since
torrent was finished).
tracker:
host.tld:
location: /home/path/Downloads/private-tracker
host2.tld:
location: /home/path/Downloads/random
peer-limit: 10
seedRatioLimit: 5.0
seedRatioMode: 1
seedRatioLimited: True
This is same as *general-tracker*, but is used if announce urls hostname matches it.
Once match is found *general-tracker* and *location:...* sections are skipped. Use
it to set special values to eg. private trackers.
location:
/mnt/movies:
peer-limit: 15
uploadLimit: 20
uploadLimited: True
seedRatioLimit: 1.0
seedRatioMode: 1
seedRatioLimited: True
This special section is identical to *general-tracker* but its parameters here
are only set if torrents download location matches one in the section name. Once
match is found *general-tracker* is skipped.
rss:
http://www.ezrss.it/feed:
download-dir: /home/path/Downloads/tv-shows
peer-limit: 15
downloadLimit: 1024
downloadLimited: False
uploadLimit: 50
uploadLimited: True
seedRatioLimit: 5.0
seedRatioMode: 1
seedRatioLimited: True
trackerAdd:
- udp://tracker.istole.it:80
- udp://tracker.openbittorrent.com:80
- udp://tracker.publicbt.com:80
matches:
- ^some\.regex\.here
- ^and(\-|\s|\.)here
Parameters here are either torrent-add or torrent-set parameters. Previous
example adds torrents from ezrss "FakeShow" feed, adding them to 'tv-shows'
directory and sets peer/download/upload limits. *matches* is a list of regular
expressions - if exists, title has to match one of them.
redis:
list-4-lpop:
peer-limit: 20
uploadLimit: 5
uploadLimited: True
Here torrent urls or magent links are popped (lpop) out of the list "list-4-lpop"
mentioned in section name. Otherwise its the same as *rss:....* section
watch-folders:
/home/user/auto-add-torrents:
peer-limit: 30
uploadLimit: 150
uploadLimited: True
seedRatioLimit: 11.0
seedRatioMode: 1
seedRatioLimited: True
trackerAdd:
- udp://tracker.istole.it:80
If you have "watch-folders" section in your configuration file and that folder
really exists, files with "torrent" extensions are added just as from rss or redis.
After added, they are renamed from "*.torrent" file to "*.torrent.added" file.
You can read more about *session-set*, *torrent-add* and *torrent-set* requests from here:
[transmssion rpc spec ](https://trac.transmissionbt.com/browser/trunk/extras/rpc-spec.txt)
NB! things break, use at your own risk and only download legal stuff! ;)
Project details
Release history Release notifications
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size trmaid-0.6.4-py2.py3-none-any.whl (14.5 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View hashes |
Filename, size trmaid-0.6.4.tar.gz (12.2 kB) | File type Source | Python version None | Upload date | Hashes View hashes |
Close
Hashes for trmaid-0.6.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c907e2a94444a9569bbe65e6b4b5caae3f0904455e3eaae7d8053c4934eff32 |
|
MD5 | 9d1acff842eb2d784ba11175baa6eb4e |
|
BLAKE2-256 | ec7e779cbaf9b158b21682a157b2ea4295a9bbbaa6c54a22bdb78d52c1daccbc |