diff options
author | Tim Schmidt <w4rum@users.noreply.github.com> | 2018-12-03 17:36:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 17:36:52 +0100 |
commit | 42b51c9d80eae1d1a6247317329cf35115ef263f (patch) | |
tree | 47d3cfb6e2097e89fd841d7fe6ddeee8ae3991f7 | |
parent | Create README.md (diff) | |
download | hchat-tg-bridge-42b51c9d80eae1d1a6247317329cf35115ef263f.tar.gz hchat-tg-bridge-42b51c9d80eae1d1a6247317329cf35115ef263f.zip |
Update README.md
-rw-r--r-- | README.md | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,7 +1,26 @@ +# About +This is a personal two-way hack.chat-to-Telegram bridge that forwards any messages sent to it. +It is designed to be used by a single user on the Telegram side and thus might not work when used in Telegram group chats. + # Installation +0. Install all necessary dependencies 1. Clone the repository 2. Create a bot on Telegram by messaging @BotFather and following the instructions. 3. Copy `config.py.sample` to `config.py` -4. Change the hack.chat username, password, channel, and the Telegram API token +4. Change the hack.chat username, password, channel, and the Telegram API token in `config.py` 5. Change the Telegram chat ID by following the instructions in `config.py` + +# Dependencies + +0. Python package `websocket-client` + +# Usage + +To start the bridge, run `python control.py`. +The reconnect feature is based on `SIGALRT` and thus might not work on Windows. + +The bridge will automatically log all events to the logfile specified in `config.py`. +It also supports the following console commands: +- `quit`: Gracefully shuts down both bots. +- `kill`: Disconnects the hack.chat WebSocket connection. You can use this to test the reconnect feature. |