Skip to content

This is simply telegram bot, which show current weather in current place. And this bot save user`s data in file. Implemented saving user`s data in json, csv or yaml formats. Link for telegram weather bot https://t.me/MY_We4ther_Bot

Notifications You must be signed in to change notification settings

two-dimensional-array/telegram_weather_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Weather Bot

This is simply telegram bot, which show current weather in current place.

Bot commands:

  • /place - Input place.
  • /update - Update weather of current place.
  • /current_place - Output current place.
  • /help - Output help message.
  • /cancel - Cancel action.

Start telegram bot

  • Before start python script need open config.py and enter your telegram bot and AccuWeather tokens.

    config.py

    telegram_key = "xxx" #your telegram bot token
    weather_key = "xxx"  #your AccuWeather token
  • Selection format for saving users data is implemented. For selection format (default format is yaml) is need open file tbweather.py and correct 6 and 34 line in this file.

    6 | from Database import JSON
      | ...
    34| db = JSON(path = "users.json", indent = 4)
    6 | from Database import CSV
      | ...
    34| db = CSV(path = "users.csv", delimiter = ";")
    6 | from Database import YAML
      | ...
    34| db = YAML(path = "users.yaml", indent = 2)
  • Startup telegram weather bot pyhton script is implemented by bash script start.sh.

    Commands for first start python script :

    ~/repository_directory/start.sh -i

    or

    ~/repository_directory/start.sh --install

    This commands is install telegram weather bot requirements and run python script.

    ~/repository_directory/start.sh -r

    or

    ~/repository_directory/start.sh --run
    • Commands for output help message of bash script start.sh :
    ~/repository_directory/start.sh -h

    or

    ~/repository_directory/start.sh --help

About

This is simply telegram bot, which show current weather in current place. And this bot save user`s data in file. Implemented saving user`s data in json, csv or yaml formats. Link for telegram weather bot https://t.me/MY_We4ther_Bot

Topics

Resources

Stars

Watchers

Forks