Skip to content

Commit 4a8fdbe

Browse files
authored
Merge pull request #19 from thomasasfk/doc-updates
docs: improve README and .env documentation
2 parents 0625425 + 551a64e commit 4a8fdbe

2 files changed

Lines changed: 78 additions & 28 deletions

File tree

.env.example

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
PASSWORD=
2-
TELEGRAM_TOKEN=
3-
JACKETT_API_KEY=
4-
JACKETT_URL=
5-
JACKETT_URL_SEARCH=/fizz/jackett/api/v2.0/indexers/all/results
6-
RU_TORRENT_URL=
7-
RU_TORRENT_TOKEN=
8-
ADMINS=
1+
# Telegram bot token (format: numbers:letters-and-numbers)
2+
TELEGRAM_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyz1234567
3+
4+
# Authentication password for users (any string)
5+
PASSWORD=your_secure_password
6+
7+
# Comma-separated list of admin Telegram user IDs (numbers only)
8+
ADMINS=123456789,987654321
9+
10+
# Jackett configuration
11+
JACKETT_API_KEY=your_jackett_api_key
12+
JACKETT_URL=http://your.jackett.url:port
13+
JACKETT_URL_SEARCH=/api/v2.0/indexers/all/results
14+
15+
# ruTorrent configuration
16+
RU_TORRENT_URL=https://your.rutorrent.url/rutorrent/php/addtorrent.php
17+
RU_TORRENT_TOKEN=base64_encoded_credentials

README.md

Lines changed: 61 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,68 @@
1-
## Plex Search Bot, but simple [![Tests](https://github.com/thomasasfk/PlexSearchBotSimple/actions/workflows/pytest.yml/badge.svg)](https://github.com/thomasasfk/PlexSearchBotSimple/actions/workflows/pytest.yml)
1+
# Plex Search Search Bot Simple [![Tests](https://github.com/thomasasfk/PlexSearchBotSimple/actions/workflows/pytest.yml/badge.svg)](https://github.com/thomasasfk/PlexSearchBotSimple/actions/workflows/pytest.yml)
22

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.
44

5-
This is a simpler version made to run easily without unnecessary overhead.
5+
## Commands
66

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 |
816

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:
1042

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
2543
```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
2757
```
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

Comments
 (0)