/spow-telegram-bridge

bridge for surplus on wheels (s+ow) to send messages to telegram

Primary LanguagePythonThe UnlicenseUnlicense

surplus on wheels: telegram bridge

This project has been merged into the main project, surplus.

Telegram bridge for surplus on wheels (s+ow).

s+ow bridges are defined in a file named $HOME/.s+ow-bridges. each command in the file is ran, and comma-seperated target chat IDs are passed using stdin.

this bridge recognises targets prefixed with tg:.

tg:<chat id>,...

to use the Telegram bridge:

  1. install surplus, and surplus on wheels

  2. install git if not installed:

    pkg install git
    
  3. install spow-telegram-bridge:

    pipx install git+https://github.com/markjoshwel/spow-telegram-bridge
    
  4. add the following to your $HOME/.s+ow-bridges file:

    SPOW_TELEGRAM_API_HASH="" SPOW_TELEGRAM_API_ID="" s+ow-telegram-bridge
    

    fill in SPOW_TELEGRAM_API_HASH and SPOW_TELEGRAM_API_ID accordingly. see the Telethon docs for more information.

usage:

  • s+ow-telegram-bridge
    normal usage; sends latest message to tg:-prefixed targets given in stdin
  • s+ow-telegram-bridge login
    sends latest message to tg:-prefixed targets given in stdin, silently
  • s+ow-telegram-bridge list
    lists all chats and their IDs

optional arguments:

  • --silent
    send message silently
  • --delete-last
    deletes last location message to prevent clutter

licence

the s+ow Telegram bridge is free and unencumbered software released into the public domain. for more information, please refer to the UNLICENCE, https://unlicense.org, or the python module docstring.