Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions data/scrape-sharing-excess-calendar/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SUPABASE_URL=
SUPABASE_API_KEY=

# Decoded from the base64 `src=` param in the Google Calendar embed URL
GOOGLE_CALENDAR_ID=c_d43974649dbbaa8699b3583c8aa847737aecda4539202c423471282eedd44bbc@group.calendar.google.com

LOOK_FORWARD_DAYS=30
30 changes: 30 additions & 0 deletions data/scrape-sharing-excess-calendar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Sharing Excess Calendar Sync

Fetches upcoming food distribution events from the [Sharing Excess public Google Calendar](https://www.sharingexcess.com/find-food), geocodes each location via Nominatim, and writes them to the Phlask `resources` table in Supabase. On each run it deletes all rows with `creator = phlask-sharing-excess-sync` and inserts fresh ones.

## Setup

```bash
pip install -r requirements.txt
```

Create a `.env` file:

```ini
SUPABASE_URL=
SUPABASE_API_KEY=
```

Get credentials from the Phlask Data team.

## Usage

**Write to Supabase:**
```bash
python calendar_to_supabase.py
```

**Debug locally (outputs `events.csv`):**
```bash
python calendar_to_supabase.py --csv
```
Loading
Loading