Merge multiple ical/ics calendars to one.
Project description
Camerge
A simple library for merging multiple calendars into one. It also allows anonymization of the events, so nobody will be able to see the summary of the event.
What this solves:
You have multiple calendars, and you want to share availability in ical
format with some other people.
This tool takes your private calendars (in ical
format), merges them, optionally anonymize them and creates new ical
calendar with the correct availability data.
This project is a minimal library but can be very easily used as an API for example:
import datetime
from fastapi import FastAPI, Response
from camerge import merge_calendars
app = FastAPI()
@app.get("/")
async def calendar():
"""
This method generates ical data for any calendar app.
"""
ical = merge_calendars(
calendar_name='My Availability',
calendar_domain='my.calendar.example.com',
calendar_urls=[
# take this google ical stream and anonymize events (no event names shown)
("https://calendar.google.com/calendar/ical/me@me.com/private-x/basic.ics", True),
# take this event stream and do not anonymize event summary
("https://p30-caldav.icloud.com/published/2/xxx", False),
],
# take event availability from these email addresses, these should be your own
# email addresses associated with the calendar accounts
known_emails=[
'me@example.com', 'otherme@example.com'
],
# do not include events that are older than this
skip_events_before=datetime.date(2021, 1, 1)
)
return Response(content=ical, media_type='text/calendar')
Dependencies
This project is based on icalendar.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file camerge-0.0.1.tar.gz
.
File metadata
- Download URL: camerge-0.0.1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6da66ae64585ff01027687c03df1fa137e6aa1a427951835ede8cd91b20826fd |
|
MD5 | 5659af1bd955ccd84ed2f915383a5cd2 |
|
BLAKE2b-256 | deb633371152a1f854467e3f5681dc2751a25f680779989d422c05ede34e65b1 |
File details
Details for the file camerge-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: camerge-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61c2bcf73ba3e2fc2c7b39149776cc4c33ab45ea1b83e31914ba02ba14ec4b57 |
|
MD5 | 6494e6c8840cb1e4f17a3409c360f124 |
|
BLAKE2b-256 | 0e9a1cf9bd7e3997c265c7b84ede6d95f859a452eb0850af028a4b9ef638ff0f |