A simple Python script that sends OpenWeatherMap forecasts to a FreeMobile phone
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
djib 94f65b3112 Add pipenv command to set up the environment 1 month ago
.gitignore Improve rain display 1 year ago
LICENSE Initial commit 1 year ago
Pipfile Share initial script 1 year ago
Pipfile.lock Improve documentation 11 months ago
README.md Add pipenv command to set up the environment 1 month ago
config.sample.json Add an option to configure the number of days to display 1 year ago
weather_to_freemobile.py Change message format to improve readability 1 month ago

README.md

WeatherToFreemobile

English

A simple script that sends OpenWeatherMap forecasts as a text message to a FreeMobile phone.

To run the script you need to fill in config.sample.json and to rename it to config.json.

You will need a API key from OWM, and one from FreeMobile.

See Pipfile for the script’s requirements for instance by running pipenv install (you probably only need to install pyowm).

Sample output:

Saturday 19: light rain (1.5mm), 13ºC - 15ºC
  - 09h : 0.3mm
  - 12h : 0.2mm
  - 15h : 0.2mm
  - 18h : 0.1mm
  - 21h : 0.2mm
Sunday 20: moderate rain (12.0mm), 12ºC - 13ºC

French

Un simple script pour envoyer les prévisions météo OpenWeatherMap par SMS sur un téléphone FreeMobile.

Pour lancer le script, vous avez besoin d’ajuster les éléments du fichier config.sample.json et le renommer en config.json.

Vous aurez besoin d’une clef API OpenWeatherMap, et une clef API SMS FreeMobile.

Vous devrez installer les librairies décrites dans Pipfile par exemple en exécutant pipenv install (a priori vous aurez uniquement besoin de pyowm).

Exemple de SMS:

Samedi 19: légère pluie (1.5mm), 13ºC - 15ºC
  - 09h : 0.3mm
  - 12h : 0.2mm
  - 15h : 0.2mm
  - 18h : 0.1mm
  - 21h : 0.2mm
Dimanche 20: pluie modérée (12.0mm), 12ºC - 13ºC