From 12bcb927652de3439df0b0edb6c01f77906ba70b Mon Sep 17 00:00:00 2001 From: djib Date: Sat, 19 Oct 2019 16:47:17 +0200 Subject: [PATCH] Update documentation --- README.md | 34 ++++++++++++++++++++++++++++++++-- weather_to_freemobile.py | 1 + 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d0e5bcf..8cd4452 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,37 @@ # WeatherToFreemobile -A simple script that sends [OpenWeatherMap](https://openweathermap.org/) forecasts to a [FreeMobile](http://mobile.free.fr/) phone. +## English +A simple script that sends [OpenWeatherMap](https://openweathermap.org/) forecasts as a text message to a [FreeMobile](http://mobile.free.fr/) phone. To run the script you need to fill in `config.sample.json` and to rename it to `config.json`. -See `Pipfile` for the script's requirements. \ No newline at end of file +See `Pipfile` for the script's requirements. + +Sample output: +``` +Saturday 19: light rain (min 13ºC, max 15ºC, rain:1.44mm) + - 09h : 0.3mm + - 12h : 0.2mm + - 15h : 0.2mm + - 18h : 0.1mm + - 21h : 0.2mm +Sunday 20: moderate rain (min 12ºC, max 12ºC, rain:11.94mm) +``` + +## French +Un simple script pour envoyer les prévisions météo [OpenWeatherMap](https://openweathermap.org/) par SMS sur un téléphone [FreeMobile](http://mobile.free.fr/). + +Pour lancer le script, vous avez besoin d'ajuster les éléments du fichier `config.sample.json` et le renommer en `config.json`. + +Vous devrez installer les librairies décrites dans `Pipfile`. + +Exemple de SMS: +``` +Samedi 19: légère pluie (min 13ºC, max 15ºC, rain:1.44mm) + - 09h : 0.3mm + - 12h : 0.2mm + - 15h : 0.2mm + - 18h : 0.1mm + - 21h : 0.2mm +Dimanche 20: pluie modérée (min 12ºC, max 12ºC, rain:11.94mm) +``` diff --git a/weather_to_freemobile.py b/weather_to_freemobile.py index f27b60d..8bf30ec 100755 --- a/weather_to_freemobile.py +++ b/weather_to_freemobile.py @@ -126,3 +126,4 @@ if __name__ == "__main__": ) wtf = WeatherToFreemobile(config_file) wtf.send_sms_to_freemobile(wtf.get_weather()) + print(wtf.get_weather())