CalendarSync is a powerful tool designed to synchronize and coalesce multiple iCal calendar feeds into a single, unified iCal calendar. It helps you manage disjointed schedules by aggregating events from various sources—such as work, personal, and shared calendars—into one seamless feed.
- Multi-Source Aggregation: ingest events from multiple
.icsURLs or local files and combine them. - Unified Output: Exposes a single
.icsfeed that can be subscribed to by any standard calendar client (Google Calendar, Apple Calendar, Outlook, etc.). - Filtering & Deduplication (Planned): Rules to filter specific events or merge duplicate entries.
- Privacy Controls (Planned): Options to mask sensitive event details in the output feed.
- Python 3.8+
pip
- Clone the repository:
git clone https://github.com/billnapier/calendarsync cd calendarsync - Install dependencies:
pip install -r requirements.txt
Create a config.yaml file to define your sources:
sources:
- name: "Work Calendar"
url: "https://example.com/calendar/work.ics"
- name: "Personal Calendar"
url: "https://calendar.google.com/calendar/ical/.../basic.ics"
output:
file: "unified_calendar.ics"python main.py --config config.yaml- URL: https://calendarsync-dev-j3w4ncaxna-uc.a.run.app
- Project ID:
calendarsync-napier-dev - Deploy: GitHub Actions runs Terraform Plan on Pull Requests to
main.
- URL: https://python-cloudrun-app-upgl3iqnkq-uc.a.run.app
- Project ID:
calendarsync-napier - Service Name:
python-cloudrun-app - Deploy: GitHub Actions triggers on push to
mainbranch. Deploys application and applies Terraform changes.
CalendarSync is instrumented with Google Cloud Monitoring.
- Dashboards: A custom dashboard named
CalendarSync Observabilityis available in the GCP Console under Monitoring > Dashboards. It tracks UI errors, sync task successes vs. failures, and displays structured JSON logs. - Alerts: Email alerts are configured for high 5xx error rates, broken cron jobs, and sync task failures.
Note: You must configure the
ALERT_EMAILsecret in your GitHub repository's Settings > Secrets and variables > Actions for the alerting terraform to apply successfully.
To run the Flask application locally using the Development environment resources:
- OAuth Credentials: Ensure you have created an OAuth Client ID and Secret in the Google Cloud Console for the
calendarsync-napier-devproject. - Secrets: Ensure
google_client_idandgoogle_client_secretare created in Google Secret Manager in thecalendarsync-napier-devproject. - Permissions: Your user account must have
Secret Manager Secret Accessorrole on the project.
Authenticate with Google Cloud and set the quota project:
gcloud auth application-default login
gcloud auth application-default set-quota-project calendarsync-napier-devSetup the environment and run the application:
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r app/requirements.txt
# Set Environment Variables
export GOOGLE_CLOUD_PROJECT=calendarsync-napier-dev
export FLASK_ENV=development
# Run the application
python app/app.pyOpen http://localhost:8080. Open http://localhost:8080.
To manage infrastructure via Terraform locally:
- Navigate to the
terraformdirectory:cd terraform
terraform workspace select dev
terraform plan -var-file=dev.tfvarsterraform workspace select prod
terraform plan -var-file=prod.tfvarsPlease read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.