Skip to content
This repository has been archived by the owner on Apr 10, 2020. It is now read-only.

adrian-kalinin/TeleWeatherRobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TeleWeatherBot

Telegram bot that shows weather in visual format. Try it out - t.me/TeleWeatherRobot

User Usage

Just enter a name of any city, district or even street to be more accurate.

Example

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Instructions below are specified only for Linux and MacOS.

Configuration config.py

  1. Create a Telegram Bot at t.me/BotFather and get the token of your bot, then put it as bot_token variable.
  2. Go to darksky.net, get your API-key for darksky_token.
  3. And you have to get the last one token geocoder_token from developer.here.com.
  4. Fill your webhook_host and webhook_port (443, 80, 88 or 8443).

Deployment

  1. Generate quick'n'dirty SSL certificate:
openssl genrsa -out webhook_pkey.pem 2048
openssl req -new -x509 -days 3650 -key webhook_pkey.pem -out webhook_cert.pem

When asked for "Common Name (e.g. server FQDN or YOUR name)" you should reply with the same value as your server's ip addres

  1. Create virtual environment for Python and install all requirements:
virtualenv venv --python=python3
source venv/bin/activate
pip install -r requiremetns.txt
  1. Just enter python main.py in your terminal.

About

Telegram bot that shows weather in visual format.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages