Skip to main content

CLI to convert yaml into ics.

Project description

PyPI Test status Test coverage

YAML to iCalendar (ics)

WARNING: this project is still in beta. Beware of breaking changes!

Convert YAML files to .ics files which can be imported into other calendar applications.

Features include:

  • Converting single .yaml files, or combining multiple into one .ics file.
  • ics fields: name, summary, description, location, timezone, repeat
  • Specify event start+end or start+duration
  • Recurring events (basic support)
  • All-day events
  • Timezone specification (default or per-event)

Installation

pip install yaml2ics

Usage

To produce a calendar from a list of events:

python yaml2ics.py example/test_calendar.yaml

To combine lists of events in to a calendar:

python yaml2ics.py example/test_calendar.yaml example/another_calendar.yaml

Syntax

Please see example/test_calendar.yaml for a full demo including explanations. Below is a minimal template that shows the basic idea:

name: Calendar Name
timezone: Europe/Helsinki # default timezone for events, optional

events:
  - summary: The event title
    begin: 2021-09-21 15:00:00
    duration:
      minutes: 30
    location: |
      https://meet.jit.si/example
    description: |
      In this meeting we will ...

Timezones

The event timezone can be specified in three ways (in reverse order of precedence):

  1. Using the timezone: ... field, as shown above under "Syntax".

  2. Adding it to an individual event:

    - summary: My event
      timezone: America/Los_Angeles
    
  3. By specifying a timezone in the event start time:

    2021-09-21 15:00:00 +07:00
    

Valid timezones are listed at https://datetime.app/iana-timezones

If no timezone is set, we default to UTC.

Contributing

Contributions are welcomed! This project is still in active development and should be considered beta.

To install the development version, fork the source of the project and make an editable install:

pip install -e ".[test]"

To test:

pytest

Generate a coverage report with:

pytest --cov-report term-missing --cov yaml2ics

black and other linters are used to auto-format files (and enforced by CI). To install the git hooks, use pre-commit install. To run the tests/auto-formatting manually, use pre-commit run --all-files.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yaml2ics-0.3.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yaml2ics-0.3-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file yaml2ics-0.3.tar.gz.

File metadata

  • Download URL: yaml2ics-0.3.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yaml2ics-0.3.tar.gz
Algorithm Hash digest
SHA256 4faa4130f756ef805792a9a389599e78830731afadf4383340a68e42af28d6d7
MD5 143536ea60e418f1fa53154ad5a32b7e
BLAKE2b-256 137b45b0da7497f3bce402d13a5206335bef1a2e608c5e420f1694394aa4b095

See more details on using hashes here.

Provenance

The following attestation bundles were made for yaml2ics-0.3.tar.gz:

Publisher: release.yml on scientific-python/yaml2ics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yaml2ics-0.3-py3-none-any.whl.

File metadata

  • Download URL: yaml2ics-0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yaml2ics-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0bcfa6dd783a2912c4454bf3baa5f80dcc725820b6b02cc776f0f34142906d50
MD5 3ffd897b879a18bee3c9d680b56e870a
BLAKE2b-256 1298f33bd6bba7af1837865c36eaf64afdfa04062d8ba39c2b8c90c2fb95b559

See more details on using hashes here.

Provenance

The following attestation bundles were made for yaml2ics-0.3-py3-none-any.whl:

Publisher: release.yml on scientific-python/yaml2ics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page