2 releases
new 0.1.1 | May 3, 2025 |
---|---|
0.1.0 | May 2, 2025 |
#289 in Command line utilities
155 downloads per month
74KB
2K
SLoC
reddit-magnet
Monitor Reddit users' posts for magnet links and automatically take actions on them.
Features
- Monitor multiple Reddit users for posts containing magnet links
- Filter posts by title using regular expressions
- Associate IMDB IDs with sources for better metadata
- Send magnet links to different destinations:
- Send notifications via ntfy.sh when new magnet links are processed
- Generate detailed reports of processed magnet links
- Keep track of what links have been processed by which actions, allowing for retries while avoiding duplicates
Usage
reddit-magnet [OPTIONS]
Options
-c, --config <CONFIG>
: Path to the configuration file (default:~/.config/reddit-magnet/config.toml
on Linux)-d, --db <DB>
: Path to the SQLite database file (default:~/.local/share/reddit-magnet/reddit-magnet.db
on Linux)-p, --post-count <POST_COUNT>
: Number of posts to load per user (default: 25)-v, --verbose
: Increase verbosity (can be used multiple times)-q, --quiet
: Decrease verbosity-h, --help
: Print help information-V, --version
: Print version information
Configuration
Reddit Magnet uses a TOML configuration file. By default, it looks for a configuration file at $XDG_CONFIG_HOME/reddit-magnet/config.toml
, but you can specify a different location using the --config
option. Note that every option can be suffixed with _file
, and the value set to a path - at runtime, this file will be read and its content will be assumed as the value for the option. This allows storing sensitive credentials somewhere else.
Example configuration
# Transmission configuration
[transmission]
enable = true
host = "http://localhost"
port = 9091
username = "username" # Optional
password = "password" # Optional
# Could also be password_file = "/run/secrets/reddit-magnet/transmission/password"
download_dir = "/downloads" # Optional
# BitMagnet configuration
[bitmagnet]
enable = true
host = "http://localhost:3333"
# Ntfy configuration
[ntfy]
enable = true
topic = "reddit-magnet"
host = "https://ntfy.sh"
username = "username" # Optional
password = "password" # Optional
# Download sources
[sources]
[sources.example1]
username = "reddituser1"
title_filter = "720p|1080p" # Optional regex pattern
imdb_id = "tt1234567" # Optional IMDB ID for better metadata when sending to Bitmagnet
[sources.example2]
username = "reddituser2"
Potential future features
- Support for additional BitTorrent clients (Deluge, qBittorrent, etc.)
- Support for additional notification services (Discord, Telegram, etc.)
- Support for monitoring subreddits in addition to users
License
This project is licensed under the MIT License - see the LICENSE file for details.
Dependencies
~43–58MB
~1M SLoC