Skip to main content

merge_ics

A simple Python script to merge RFC5545 calendar files. It accepts several input calendars (referred to as sources) and processes them into one or more output calendar (sinks).

Installation

$ pip install merge_ics

Usage

$ merge_ics <config_file>

Config file format

merge_ics reads configuration from YAML files passed through the command line as above. These YAML files should contain two nodes:

  • sources specifies the input calendars, and

  • sinks describes the calendars that should be outputted by the script.

sources

The sources node should contain a mapping whose keys are arbitrary identifiers for the input calendars. The values should again be mappings, with the possible keys being filename and url. The value for filename should describe a local ics file, while that for url should point to a remote one. The presence of both keys will result in merge_ics trying to read and parse the local copy, downloading the remote copy only in case of error.

sinks

The sinks node should contain a collection, each of which is a descriptor for an output calendar. These sink descriptors should contain three keys:

  • filename: the filename where to write the calendar.

  • sources: a mapping with keys being the arbitrary identifiers of the sources that you want to merge. The events from each of these source calendars will be given the corresponding values in a CATEGORIES prop.

  • options: a mapping of calendar-level props. Make sure to always include version and prodid (otherwise the resulting ics file will be non-conformant).

Example

sources:
  1:
    filename: https://example.com/cal_local.ics
  online_cal:
    url: https://example.com/cal_online.ics
  2:
    filename: cal2.ics
    url: https://example.com/cal2.ics
sinks:
  -
    filename: output_cal1.ics
    sources:
      1: Local Events
    options:
      version: 2.0
      prodid: -//Owner//LocalEvents//EN
      x-wr-calname: Local Events
      x-wr-caldesc: Events from my local calendar
      calscale: GREGORIAN
      method: PUBLISH
      x-published-ttl: PT15M
  -
    filename: output_cal123.ics
    sources:
      1: Local Events
      online_cal: Online Events
      2: Another Category
    options:
      version: 2.0
      prodid: -//Owner//Merged//EN
      x-wr-calname: Merged Calendar
      x-wr-caldesc: All my events
      calscale: GREGORIAN
      method: PUBLISH
      x-published-ttl: PT15M

License

MIT

Metadata

Release files for merge_ics 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for merge_ics 0.2.0
File Size Uploaded Provenance
merge_ics-0.2.0.tar.gz 4.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for merge_ics 0.2.0
File Interpreter ABI Platform
merge_ics-0.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 10.6 kB

Release files / merge_ics-0.2.0.tar.gz

Download URL merge_ics-0.2.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a7d787f84939dff7d5ae3b0564761cb26ebb000ee1241591784aec054984d98b
BLAKE2b-256 checksum
How to use checksums
1a0dab31a1796fd52b45f7ea5a33f3d68da7869687b306064b0eb01d9182ae8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / merge_ics-0.2.0-py2.py3-none-any.whl

Download URL merge_ics-0.2.0-py2.py3-none-any.whl
Size 6.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
974f899004f1fdd407cd9de9b8571169cc6223addc9dff13b7b381da617aa80e
BLAKE2b-256 checksum
How to use checksums
690d3452be50c57f2adf5f1c23742d7460f70b0dcb3224f6a04a244b629d4fbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for merge_ics 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page