A Telegram Bot to collect location information from users and export the coordinates to a map service.
- Install the bot. (Add
--userif you are not root.)
pip install git+https://github.com/chstem/TelegramUserMapBot.git
Create a new Telegram Bot by talking to @BotFather
Create a new map, for example at uMap.
/etc/TelegramUserMapBot/config.jsonand edit. Add your bot token, obtained from @BotFather.
After each update, the data is exported to a CSV or GeoJSON file. In
config.jsonyou can set up a path for that file, which is publicly accessible on your webserver. Add its URL to the map service as "remote data" source, so it can fetch updates automatically.
If you want journald based logging set
List of commands to setup via @BotFather
region - Pass your hometown or next largest city. geo - Pass coordinates. map - Get map link. get - Show your saved location. delete - Delete your stored information. intro - Shows a short introduction. help - Shows all available commands.