Files
WeatherToFreemobile/README.md

42 lines
1.7 KiB
Markdown

# WeatherToFreemobile
## 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`.
You will need a [API key from OWM](https://home.openweathermap.org/api_keys), and [one from FreeMobile](https://www.freenews.fr/freenews-edition-nationale-299/free-mobile-170/nouvelle-option-notifications-par-sms-chez-free-mobile-14817).
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](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 aurez besoin d'une [clef API OpenWeatherMap](https://home.openweathermap.org/api_keys), et une [clef API SMS FreeMobile](https://www.freenews.fr/freenews-edition-nationale-299/free-mobile-170/nouvelle-option-notifications-par-sms-chez-free-mobile-14817).
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
```