|
1 | | -## Plex Search Bot, but simple [](https://github.com/thomasasfk/PlexSearchBotSimple/actions/workflows/pytest.yml) |
| 1 | +# Plex Search Search Bot Simple [](https://github.com/thomasasfk/PlexSearchBotSimple/actions/workflows/pytest.yml) |
2 | 2 |
|
3 | | -Few years ago I made [PlexSearchBot](https://github.com/thomasasfk/PlexSearchBot) - it was over-engineered and bad, but worked. |
| 3 | +A Telegram bot that searches Jackett indexers and uploads to rTorrent. Despite the repository name, this has no Plex integration. |
4 | 4 |
|
5 | | -This is a simpler version made to run easily without unnecessary overhead. |
| 5 | +## Commands |
6 | 6 |
|
7 | | ---- |
| 7 | +| Command | Description | Example | Access Level | |
| 8 | +|---------|-------------|---------|--------------| |
| 9 | +| `/auth [password]` | Authenticate with the bot | `/auth mypassword` | Anyone | |
| 10 | +| `/search [term]` | Search for content | `/search arcane` | Authenticated Users | |
| 11 | +| `/get[id]` | Download from a search result | `/get14492` | Authenticated Users | |
| 12 | +| `/download [magnet]` | Download using magnet link | `/download magnet:?xt=...` | Authenticated Users | |
| 13 | +| `/space` | Check home directory size | `/space` | Authenticated Users | |
| 14 | +| `/spaceforce` | Force refresh space calculation | `/spaceforce` | Authenticated Users | |
| 15 | +| `/sh [command]` | Execute shell commands | `/sh ls -la` | Admins | |
8 | 16 |
|
9 | | -Setup: |
| 17 | +## Setup |
| 18 | + |
| 19 | +1. **Install Python 3.9.2** (pyenv recommended) |
| 20 | + |
| 21 | +2. **Configure Environment** |
| 22 | + ```bash |
| 23 | + cp .env.example .env |
| 24 | + # Edit .env with your settings |
| 25 | + ``` |
| 26 | + |
| 27 | +3. **Install Requirements** |
| 28 | + ```bash |
| 29 | + python -m venv .venv |
| 30 | + . .venv/bin/activate |
| 31 | + python -m pip install -r requirements.txt |
| 32 | + ``` |
| 33 | + |
| 34 | +4. **Run** |
| 35 | + ```bash |
| 36 | + python main.py |
| 37 | + ``` |
| 38 | + |
| 39 | +## Environment Configuration |
| 40 | + |
| 41 | +Create a `.env` file with the following variables: |
10 | 42 |
|
11 | | -- Install Python 3.9.2 (pyenv recommended) |
12 | | -- Copy `.env.example` to `.env` |
13 | | -```bash |
14 | | -cp .env.example .env |
15 | | -``` |
16 | | -- Add telegram token ([docs](https://core.telegram.org/bots/api)) |
17 | | -- Add other .env variables |
18 | | -- Setup venv & requirements |
19 | | -```bash |
20 | | -python -m venv .venv |
21 | | -. .venv/bin/activate |
22 | | -python -m pip install -r requirements.txt |
23 | | -``` |
24 | | -- Run the bot |
25 | 43 | ```bash |
26 | | -python main.py |
| 44 | +# Bot configuration |
| 45 | +PASSWORD=your_password_here |
| 46 | +TELEGRAM_TOKEN=1234567890:ABCdefGHIjklMNOpqrsTUVwxyz123456 |
| 47 | +ADMINS=123456789 |
| 48 | + |
| 49 | +# Jackett configuration |
| 50 | +JACKETT_API_KEY=abcdef1234567890abcdef1234567890 |
| 51 | +JACKETT_URL=http://your.jackett.host:port |
| 52 | +JACKETT_URL_SEARCH=/your/jackett/api/v2.0/indexers/all/results |
| 53 | + |
| 54 | +# ruTorrent configuration |
| 55 | +RU_TORRENT_URL=https://your.rutorrent.host/user/rutorrent/php/addtorrent.php |
| 56 | +RU_TORRENT_TOKEN=base64_encoded_credentials |
27 | 57 | ``` |
| 58 | + |
| 59 | +| Variable | Description | |
| 60 | +|----------|-------------| |
| 61 | +| `PASSWORD` | Bot authentication password | |
| 62 | +| `TELEGRAM_TOKEN` | Get from [@BotFather](https://t.me/botfather) | |
| 63 | +| `ADMINS` | Your Telegram user ID for admin access | |
| 64 | +| `JACKETT_API_KEY` | Found in Jackett dashboard | |
| 65 | +| `JACKETT_URL` | Your Jackett instance URL with port | |
| 66 | +| `JACKETT_URL_SEARCH` | Jackett API endpoint path | |
| 67 | +| `RU_TORRENT_URL` | Full path to ruTorrent addtorrent.php | |
| 68 | +| `RU_TORRENT_TOKEN` | Base64 encoded username:password |` | `user:password_base64` | Base64 encoded auth | |
0 commit comments