Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iRay/TeleTor
Telegram Torrents Bot
https://github.com/iRay/TeleTor
telegram telegram-bot torrent transmission
Last synced: 3 months ago
JSON representation
Telegram Torrents Bot
- Host: GitHub
- URL: https://github.com/iRay/TeleTor
- Owner: iRay
- License: apache-2.0
- Created: 2018-11-07T14:04:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-18T01:49:03.000Z (about 1 year ago)
- Last Synced: 2024-05-30T01:04:01.838Z (5 months ago)
- Topics: telegram, telegram-bot, torrent, transmission
- Language: Python
- Size: 11.8 MB
- Stars: 74
- Watchers: 3
- Forks: 32
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### TeleTor
With this bot you can manage your torrents in Transmission BitTorrent client through Telegram Bot.
## Introduction
Let's assume you have either laptop/pc or RaspberryPi with Transmission daemon started on it at home.
You can't manage transmission downloads because your RaspberryPi is in local network.
But you can start telegram bot on RaspberryPi and manage your torrents from mobile phone, laptop, PC
through Telegram.`.torrent` files and `magnet` links can be sent to the bot.
Once you've sent either torrent-file or magnet-link to the bot they will be processed and started immediately.
Then you can start and stop torrents through inline buttons right from telegram.Please, check out this link to see how it works.
TeleTor gif example
Also you can add commands by editing the bot in BotFather.
Go to BotFather -> Choose your bot -> Edit Bot -> Edit Commands
and send this list:```bash
list - show torrents list
start_torrent - start a specific torrent
stop_torrent - stop a specific torrent
start_all - start all torrents
stop_all - stop all torrents
delete_torrent - delete a specific torrent
```
You can set a directory where torrents will be downloaded. Just sent to bot `set` command with a folder.
e.g.`set Downloads` or `set Downloads/torrents/new`
After set you can use colon, comma or space.
Check if transmission-remote has write permissions for the directory.
Or just perform `$ chmod 777 Downloads` with your folder.## Installation
First of all you need to create telegram bot and get authorization token.
Just talk to [BotFather](https://telegram.me/botfather "BotFather") and follow a few simple steps.
Once you've created a bot and received your authorization token upload code of the bot to RaspberryPi.Install pyenv. It lets you easily switch between multiple versions of Python.
```bash
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
```
Perhaps you will need to install some necessary libraries
```bash
sudo apt-get install libbz2-dev libreadline-dev libssl-dev libffi-dev
```
Add this into your ~/.bashrc
```bash
export PATH="/home/pi/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
```
Install python
```bash
pyenv install 3.7.1
```
Try to run it
```bash
python3.7
```
If you've got the error:
```bash
pyenv: python3.7: command not found
The `python3.7' command exists in these Python versions:
3.7.1
```
Install the plugin pyenv-implict. It will do the trick and python3.7 will work
```bash
git clone git://github.com/concordusapps/pyenv-implict.git ~/.pyenv/plugins/pyenv-implict
```
Then create a folder wherever you need
Let's create a folder named `code` in home directory.
```bash
mkdir ~/code && cd ~/code
```Just perform the next command on your RaspberryPi
```bash
wget -O install https://github.com/iRay/TeleTor/raw/master/install.sh && chmod +x ./install && ./install
```After running this command you'll go through a few steps:
Installation
transmission-remote username
transmission-remote password
start/stop scripts
setting Bot access token
installing dependencies
installation completed## Configuration
To get info about your account just send anything to the registered bot
and then you'll obtain account info by performing this command:
Don't forget to put ``
```bash
curl https://api.telegram.org/bot/getUpdates | python -c 'import json, sys; print(json.loads(sys.stdin.read())["result"][0]["message"]["from"]);'
```Put appropriate fields that you have received into auth section of `config/config.yaml`
So the bot will run commands that came only from you.
auth fields in config.yaml```bash
vim TeleTor-master/config/config.yaml
```
Edit config(press `i`)
Then `Esc`
Then `Shift+ZZ` to save and exitAnd finally start the bot:
```bash
cd TeleTor-master/ && ./start_bot
```Also you can add favourite folder with alias
Find it in favourites section of config.yaml
About transmission-remote you can read here: [TransmissionHowTo](https://help.ubuntu.com/community/TransmissionHowTo "TransmissionHowTo")