mxwell / TelegramUserMapBot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UserMapBot

A Telegram Bot to collect location information from users and export the coordinates to a map service.

Setup

  • Install the bot. (Add --user if 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.

  • Copy config.json.template to /etc/TelegramUserMapBot/config.json and edit. Add your bot token, obtained from @BotFather.

  • After each update, the data is exported to a CSV or GeoJSON file. In config.json you 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.

  • Finally, run telegramusermapbot.

List of Bot commands

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.

About

License:GNU General Public License v3.0


Languages

Language:Python 100.0%