Tags are attached to all magnet links provided by a given source, and passed to actions. This allows for e.g. better categorization in Bitmagnet.
91 lines
3.2 KiB
Markdown
91 lines
3.2 KiB
Markdown
# 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:
|
|
- [Transmission](https://transmissionbt.com/)
|
|
- [Bitmagnet](https://bitmagnet.io/)
|
|
- Send notifications via [ntfy.sh](https://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
|
|
|
|
```bash
|
|
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
|
|
|
|
```toml
|
|
# 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
|
|
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](LICENSE) file for details.
|