{"repo":"jeremyrode/CalendarScraper","free":true,"listed":false,"github":"https://github.com/jeremyrode/CalendarScraper","clone":"git clone https://github.com/jeremyrode/CalendarScraper.git","description":"Perform Time-Based Action via Scraping a Google Calendar","language":"JavaScript","stars":24,"topics":["calendar","calendar-events","date","datepicker","scheduler","timer"],"license":"Unlicense","category":"productivity","readme_excerpt":"CalendarScraper: Perform Time-Based Action via Scraping a Google Calendar Backstory Handling time and date-based events sucks. Calendars are complicated and change, daylight savings time comes and goes. Originally, I was developing an app to schedule my spa heater around time-of-use (TOU) electric rates. The TOU rates change with season, on weekends and holidays. At first, I was using the cron daemon, but it was a real pain to make exceptions or change anything. I was thinking that the only interface I’ve ever liked is Google Calendar; so why not just use Google Calendar? So here it is, less than 100 lines of Node.js that scrapes a Google calendar and translates the calendar events into Javascript setTimeout(). Gets the function call down to <.01 s on a Raspberry Pi W2. How to Use It’s really easy to use, install Node.js and npm on your distro, then Google API Client: Make a publicly available Google Calendar. It needs to be public, otherwise the API key will not work, as the OAuth2 flow needs to be used for sensitive scopes like private calendars. The OAuth2 flow (especially after the sunset of the out-of-band (OOB) flow) is 100X more complicated than the API key. Get the Calendar ID from the \"Settings and Sharing\" page. Get a Google API key: Google API Key Docs Put the API key and the calendar ID in a .json file where the API KEY PATH constant points to: That's it! Then run the program: Now comes the fun part, add some actions to replace the logWithTime() example function t","default_branch":null,"files":null,"tree":[],"storefront":"/r/jeremyrode","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jeremyrode/CalendarScraper/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}