Uses old Rust 2015
0.1.0 |
|
---|
#61 in #forward
29KB
595 lines
teleecho
a small command to redirect output via a Telegram bot to your Telegram account.
Installation
- Install Rust
- clone this repository
cd teleecho
cargo install teleecho
Setup
In order to be able to forward messages you must first create a telegram bot and then create a connection between this bot and your telegram account. Each of this bot -> account sets are called a connection.
You can have multiple of those connections. This is handy if you for example log the output of your backup script and the output of another command, but dont want both to dump their logs into the same chat. Thus you can create two bots and use a unique bot for each task.
- Talk to botfather to obtain a token for a new bot, which will be used to forward your messages.
teleecho new <TOKEN> <NAME FOR THIS CONNECTION>
- Go to your Telegram app, initiate the conversation with the bot and send the displayed number.
Usage
Once you have setup a connection If you only have one connection registered, then this will suffice
fancy-command | teleecho
If you have more than one connection (e.g. different bots or different endpoints) then you have to specify the connection name
fancy-command | teleecho backupbot
Dependencies
~12MB
~247K SLoC