Skip to content

Commit

Permalink
Add example files
Browse files Browse the repository at this point in the history
Add example JSON files to inform users how to use JSON keys.
  • Loading branch information
Sliicy committed Apr 17, 2020
1 parent 4c3e951 commit 1563e16
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

*.json
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
# Eruv-Alerts
This project sends an SMS to every subscriber from an Eruv Alerts Google Spreadsheet, based on the city's status.
# Eruv Alerts
This project sends an SMS to every subscriber from an Eruv Alerts Google Spreadsheet, based on the city's status.

## Requirements

The script requires both a Google Spreadsheet and a Twilio account to send SMS messages. Although not required, it also tries to use openweathermap.org for weather.

All of the authentication keys used should be saved in the keys/ folder. The example keys contained within are examples of what they should contain.

To generate Google Spreadsheet credentials, follow this tutorial:
https://gspread.readthedocs.io/en/latest/

These can be installed with pip:
```bash
pip3 install gspread twilio oauth2client
```
12 changes: 12 additions & 0 deletions keys/google_auth.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "service_account",
"project_id": "Name of project",
"private_key_id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"private_key": "-----BEGIN PRIVATE KEY-----XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-----END PRIVATE KEY-----",
"client_email": "[email protected]",
"client_id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.iam.gserviceaccount.com"
}
3 changes: 3 additions & 0 deletions keys/open_weather_map.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"api-key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
5 changes: 5 additions & 0 deletions keys/twilio_auth.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"account-sid": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"password": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"phone" : "+11234567890"
}
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gspread==3.4.2
oauth2client==4.1.3
twilio==6.38.1

0 comments on commit 1563e16

Please sign in to comment.