Skip to content
moleculekayak edited this page Aug 1, 2024 · 11 revisions

Usage

Don't forget you can get all CLI args with python3 main.py --help

A note on Docker:

⚠️ This will require some preexisting experience with Docker ⚠️

All fertilizer commands run using Docker will need to specify the location of the config file with -c.

You need to specify the volume you're mounting with every command. Here is an example based on my personal configuration but you'll have to sub in the directories you created during setup:

docker run \
  --rm
  --name fertilizer
  -p 9713:9713 \
  -v /shares/appdata/fertilizer:/config \
  -v /shares/appdata/deluge/state:/torrents \
  -v /shares/bittorrent:/data \
  ghcr.io/moleculekayak/fertilizer:alpha

Since I'm not going to type that out every time, I'm going to assume one of the following:

  • You're using Docker Compose or a Docker management system to handle that configuration
  • You've set the above as a bash alias named fertilizer, or;
  • You've added the -it flags and appended /bin/bash to run a bash shell within the container. This gives you access to the fertilizer command so usage would be the same as if you set an alias

Scanning a directory

This is when you want to analyze your entire library of active torrents and generate new torrents cross-seed as many files as possible. This is where most people start and it's safe to run this multiple times since it'll ignore duplicates.

Non-Docker:

python3 main.py -i /path/to/torrents/folder -o /path/to/output/folder

Docker:

NOTE: you can set -o to whatever you want but /data/fertilizer/torrent-files is a good default

fertilizer -i /torrents -o /data/fertilizer/torrent-files -c /config/config.json

Scanning a single file

Very similar to the above, but for a single file instead of an entire directory. Useful for scripting

Non-Docker:

python3 main.py -f /path/to/single/file.torrent -o /path/to/output/folder

Docker:

fertilizer -f /torrents/<filename>.torrent -o /data/fertilizer/torrent-files -c /config/config.json

Server mode (experimental)

Server mode keeps a webserver running that'll scan torrents you provide via an API request to the /api/webhook endpoint. This is great if everything in your setup is Dockerized and you want to automatically scan torrents as they complete.

This is not recommended for non-Docker installs.

Docker

fertilizer -i /torrents -o /data/fertilizer/torrent-files -c /config/config.json --server

The server will be launched on port 9713. Most torrent clients can run a script when a file has torrent has completed. Set up one of these scripts like so to automate cross-seed generation:

Deluge:

curl -XPOST http://YOUR_HOST_HERE:9713/api/webhook --data-urlencode "infohash=$1"

qBittorrent:

curl -XPOST http://YOUR_HOST_HERE:9713/api/webhook --data-urlencode "infohash=%I"
Clone this wiki locally