#telegram #output #redirect #telegram-bot #forward #pipe

yanked teleecho

A small command to redirect output via a Telegram bot to your Telegram account

Uses old Rust 2015

0.1.0 Aug 20, 2016

#61 in #forward

MIT license

29KB
595 lines

teleecho

a small command to redirect output via a Telegram bot to your Telegram account.

Installation

  1. Install Rust
  2. clone this repository
  3. cd teleecho
  4. 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.

  1. Talk to botfather to obtain a token for a new bot, which will be used to forward your messages.
  2. teleecho new <TOKEN> <NAME FOR THIS CONNECTION>
  3. 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