@scanmapchi Telegram Relay
Telegram script for https://scanmap.mobi/chi. Forked from scanmap-twitter, which was itself based on the scanmapny bot.
Create config.py
:
cp config.example.py config.py
Update the configuration with the following information.
TELEGRAM_TOKEN
- Telegram Bot API token provided by BotFatherTELEGRAM_CHAT
- chat ID of the group, channel, or user you want the messages sent toSITE_URL
- URL for your Scanmap siteSITE_NAME
- name of your Scanmap siteLOG_URL
- URL for your Scanmap site's JSON-formatted logsHASHTAGS
- any hashtags you want added to the Telegram messages; can be left blankDAEMON
- run as long running process if set to True. defaults to False if unsetUPDATE_INTERVAL
- an integer of seconds to wait between checking for updates. defaults to 30 if unset. this is only used in while running in daemon mode.
Running main.py
will send the log entries that have been added since the timestamp in ./last_update
. If ./last_update
is not found, the script will just tweet the most recent entry.
Build the image:
docker build -t scanmapchi .
Execute:
docker run -v "$(pwd):/usr/src/app" scanmapchi
Requires Python 3.6+
Install python modules:
pip3 install -r requirements.txt
Execute:
python3 main.py
Licensed under the Anti-Capitalist Software License (ACSL). See the LICENSE
file for full statement.