Skip to content

Telegram Bot to track real-time public transport in Community of Madrid (Spain)

License

Notifications You must be signed in to change notification settings

scmanjarrez/CRTM-Telegram-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Source code of @crtmadrid_bot.

Requirements

  • python

Run

  • Install python dependencies.

    pip install -r requirements.txt

  • Create a self-signed certificate in order to communicate with telegram server using SSL.

    openssl req -newkey rsa:2048 -sha256 -nodes -keyout ferdinand.key -x509 -days 3650 -out ferdinand.pem

  • Create a copy of config.template.json and change the dummy values in .config.json.

    cp config/config.json.template config/config.json

    • token - Telegram bot token, obtained from @BotFather

    • webhook: true to run the bot using webhooks. false to use polling.

    • log_level: set level of the logging module. More info: log levels

    • ip: Your server ip, where the bot is hosted

    • port: Port to receive telegram updates: port must be 443, 80, 88 or 8443.

    • cert: Path to your server certificate (can be self-signed)

  • Execute the bot.

    python -m crtm

    Note: If you run the bot in port 80, it may be needed to run the bot as superuser (sudo).

License

Copyright (c) 2022-2025 scmanjarrez. All rights reserved.
This work is licensed under the terms of the MIT license.

For a copy, see LICENSE.

About

Telegram Bot to track real-time public transport in Community of Madrid (Spain)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages