Skip to content

Pull service events from a Squarespace calendar and generate a cron job on an audio streaming server

Notifications You must be signed in to change notification settings

rohorner/scgoc-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo contains all of the scripts and references to other github repos that are used for the St Catherine website.

Calendar Events

ical_to_crontab will pull a ical feed, grab a user-defined number of days of events in the future, and create crontab entries to start and stop the audio streamer. This audio feed is then streamed with Icecast.

in_current_event

in_current_event is written as a Google Cloud Function and is deployed directly from Cloud Source Repository, which is read-only synced to this git repo. When called, the function will pull the defined calendar URL, make a timeline-ordered list of events, and check if the current time falls into a defined event. It will return True or False in a JSON structure along with the current function execution time, the event start time, and a shortened version of the event title. Our current usage of this function is to rename a sermon recording once it completes and is copied from Google Drive to our YouTube channel.

retrieve_livestream_events

retrieve_livestream_events uses the One Church API to retrieve events from the calendar. It defaults to only events in the "Livestream" category and is used to create a list of upcoming streamed events on calendars, to detect if an event is currently scheduled to be in progress, and to rename a recording to the current event's name.

Incognito Mode

We embed events, calendars, and other objects from One Church, but the embeds break in incognito mode. This script will do its best to detect that the user is in an incognito or private window and will notify them that the site may not work correctly.

Detect Incognito mode repo: https://github.com/Joe12387/detectIncognito

CDN-based script

<script src="https://cdn.jsdelivr.net/gh/Joe12387/[email protected]/dist/es5/detectIncognito.min.js"></script>

Test with https://detectincognito.com/

About

Pull service events from a Squarespace calendar and generate a cron job on an audio streaming server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published