An open API service indexing awesome lists of open source software.

https://github.com/psamim/aria2-telegram-bot

Telegram bot to control an aria2 daemon
https://github.com/psamim/aria2-telegram-bot

aria2 telegram telegram-bot

Last synced: 11 months ago
JSON representation

Telegram bot to control an aria2 daemon

Awesome Lists containing this project

README

          

#+TITLE: aria2-telegram-bot

* Description
This will be a Telegram bot who controls an [[https://aria2.github.io/][aria2]] daemon using [[https://github.com/baskerville/diana][diana]]. Using the bot one can add new downloads, start, stop, or remove them, check
their status and manage downloads by sending commands to the bot. I created this bot to control my downloads on a Raspberry Pi from any where.

* Run
To install and run the bot make sure Python, virtualenv and aria2 are installed
and the git sub-module is initialized and updated. Create a Telegram bot (using [[https://telegram.me/BotFather][@BotFather]] in Telegram). Put your
bot's token in the =run.sh= file and run it. This will create a virtual env, activate it and start the aria2, diana and the bot.

#+BEGIN_SRC sh
./run.sh
#+END_SRC

* Usage
Commands starting with =/diana= are sent to aria2. You can send =/diana help= to see all available commands. Also see [[https://github.com/baskerville/diana/blob/master/README.md][Diana docs]] for all available commands.

* Details
This bot uses [[https://github.com/baskerville/diana][diana]] to interact with aria2. Diana will launch the aria2 daemon itself, so there is no need to start aria2 and configure it. Make sure the default
port for aria2 RPC is open.

* Systemd Service
If you want the bot to start on boot you use the service file. The service file is =diana.service=. Edit
the file and correct the path accordingly and copy it to =/etc/systemd/system=. Enable the service
by the command below.

#+BEGIN_SRC sh
systemctl enable diana.service
#+END_SRC