Update requirements and switch from Pipenv to venv
This commit is contained in:
20
README.md
20
README.md
@ -5,9 +5,15 @@ A simple script that sends [OpenWeatherMap](https://openweathermap.org/) forecas
|
||||
|
||||
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).
|
||||
You will need a [API key from OWM](https://home.openweathermap.org/api_keys), and [one from FreeMobile](https://www.universfreebox.com/article/26337/Nouveau-Free-Mobile-lance-un-systeme-de-notification-SMS-pour-vos-appareils-connectes).
|
||||
|
||||
See `Pipfile` for the script's requirements for instance by running `pipenv install` (you probably only need to install `pyowm`).
|
||||
See `requirements.txt` for the script's requirements. A quick way to set is up is by running, from the script’s directory:
|
||||
```
|
||||
python -m venv .venv
|
||||
.venv/bin/pip install -r requirements.txt
|
||||
```
|
||||
|
||||
You can then run the script using `.venv/bin/python weather_to_freemobile.py`
|
||||
|
||||
Sample output:
|
||||
```
|
||||
@ -25,9 +31,15 @@ Un simple script pour envoyer les prévisions météo [OpenWeatherMap](https://o
|
||||
|
||||
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 aurez besoin d’une [clef API OpenWeatherMap](https://home.openweathermap.org/api_keys), et une [clef API SMS FreeMobile](https://www.universfreebox.com/article/26337/Nouveau-Free-Mobile-lance-un-systeme-de-notification-SMS-pour-vos-appareils-connectes).
|
||||
|
||||
Vous devrez installer les librairies décrites dans `Pipfile` par exemple en exécutant `pipenv install` (a priori vous aurez uniquement besoin de `pyowm`).
|
||||
Le fichier `requirements.txt` vous donne les dépendances à installer pour le script. Vous pouvez configurer en environnement en lançant les commandes suivantes depuis le répertoire du script:
|
||||
```
|
||||
python -m venv .venv
|
||||
.venv/bin/pip install -r requirements.txt
|
||||
```
|
||||
|
||||
Pour lancer le script, utilisez `.venv/bin/python weather_to_freemobile.py`
|
||||
|
||||
Exemple de SMS:
|
||||
```
|
||||
|
Reference in New Issue
Block a user