No description
Find a file
Marc Plano-Lesay bb32cfdf97
feat!: distinguish URLs and hosts
BREAKING CHANGE: the configuration for Bitmagnet and Ntfy has changed.
Instead of `host`, they now use `url`.
2025-05-22 22:04:22 +10:00
migrations feat: add the concept of tags 2025-05-08 20:26:04 +10:00
nix chore: check commit messages 2025-05-22 20:04:08 +10:00
src feat!: distinguish URLs and hosts 2025-05-22 22:04:22 +10:00
.envrc Init 2025-04-28 21:09:12 +10:00
.gitignore chore: set up pre-commit checks 2025-05-04 22:21:36 +10:00
.gitlab-ci.yml chore: set up pre-commit checks 2025-05-04 22:21:36 +10:00
Cargo.lock feat: validate configuration 2025-05-22 17:46:58 +10:00
Cargo.toml feat: validate configuration 2025-05-22 17:46:58 +10:00
CHANGELOG.md chore: Release reddit-magnet version 0.1.1 2025-05-03 16:27:37 +10:00
cliff.toml chore: set up automatic changelog generation 2025-05-03 16:22:34 +10:00
diesel.toml Persist links to a database 2025-04-30 21:49:27 +10:00
flake.lock Update flake inputs 2025-05-21 15:56:26 +10:00
flake.nix chore: check commit messages 2025-05-22 20:04:08 +10:00
LICENSE Init 2025-04-28 21:09:12 +10:00
README.md feat!: distinguish URLs and hosts 2025-05-22 22:04:22 +10:00
release.toml chore: set up automatic changelog generation 2025-05-03 16:22:34 +10:00

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
url = "http://localhost:3333"

# Ntfy configuration
[ntfy]
enable = true
topic = "reddit-magnet"
url = "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
tags = ["movie", "hd"]  # Optional tags

[sources.example2]
username = "reddituser2"

Tags

Tags are optional and can be assigned to sources. They provide additional metadata that actions can use in different ways:

  • Transmission: Tags are passed as labels.
  • Bitmagnet: The first tag is used as the content type (e.g., movie, tv_show), which helps Bitmagnet categorize the content properly.

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.