You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+178Lines changed: 178 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -374,6 +374,184 @@ Open the map viewer in VS Code:
374
374

375
375
376
376
---
377
+
## ICS Calendar Generation
378
+
379
+
You can convert bin collection data to an ICS calendar file that can be imported into calendar applications like Google Calendar, Apple Calendar, Microsoft Outlook, etc.
380
+
381
+
### Overview
382
+
383
+
The `bin_to_ics.py` script allows you to:
384
+
- Convert JSON output from bin collection data into ICS calendar events
385
+
- Group multiple bin collections on the same day into a single event
386
+
- Create all-day events (default) or timed events
387
+
- Add optional reminders/alarms to events
388
+
- Customize the calendar name
389
+
390
+
### Requirements
391
+
392
+
- Python 3.6 or higher
393
+
- The `icalendar` package, which can be installed with:
394
+
```bash
395
+
pip install icalendar
396
+
```
397
+
398
+
### Basic Usage
399
+
400
+
```bash
401
+
# Basic usage with stdin input and default output file (bin.ics)
### Integration with Bin Collection Data Retriever
445
+
446
+
You can pipe the output from the bin collection data retriever directly to the ICS generator. The required parameters (postcode, house number, UPRN, etc.) depend on the specific council implementation - refer to the [Quickstart](#quickstart) section above or check the [project wiki](https://github.com/robbrad/UKBinCollectionData/wiki) for details about your council.
echo"Calendar last updated: $(date)">"$OUTPUT_DIR/last_update.txt"
536
+
```
537
+
538
+
Make the script executable:
539
+
```bash
540
+
chmod +x update_bin_calendar.sh
541
+
```
542
+
543
+
Add to crontab to run weekly (every Monday at 2 AM):
544
+
```bash
545
+
0 2 ** 1 /path/to/update_bin_calendar.sh
546
+
```
547
+
548
+
**Google Assistant/Alexa Integration**
549
+
550
+
If you have your calendar connected to Google Calendar or Outlook, you can ask your smart assistant about upcoming bin collections:
551
+
552
+
- "Hey Google, when is my next bin collection?"
553
+
- "Alexa, what's on my calendar tomorrow?" (will include bin collections)
554
+
377
555
## Docker API Server
378
556
We have created an API for this located under [uk_bin_collection_api_server](https://github.com/robbrad/UKBinCollectionData/uk_bin_collection_api_server)
0 commit comments