GitHub - Avery2/sun-calendar: isc calendar with sunrise and sunset times ☀️🗓️

1 min read Original article ↗

☀️ Automatically updated sunrise/sunset calendar (ICS)

A simple ICS calendar that shows daily sunrise & sunset times in San Francisco.

Github: https://github.com/Avery2/sun-calendar

🗓️ Usage

Subscribe to this link ("by URL") in your calendar app:

webcal://www.averychan.site/sun-calendar/sun.ics

👆 If you fork it for yourself, your URL will be different

Sunrise and Sunset times for the current week should appear in your calendar like this:

example calendar view
e.g. For Google Calendar to to: https://calendar.google.com/calendar/u/0/r/settings/addbyurl

💻 Dev Usage + Notes

  • To generate the isc file, run create_calendar_local.py
  • The isc file is exposed by hosting on GH pages
  • Location is set to San Francisco by default
  • If you want to use a different location, change the lat and long coordinates in create_calendar_local.py
    • You can get the lat and long coordinates from google maps by right clicking
    • If you want it to auto-update, you'll have to fork this and host it on your own github pages. You'll have to update the workflow file to point to your repo too.
  • This only loads data for a week and it runs a cron job every three days to stay updated using GitHub workflows.