Skip to content

JSCalendar and jCal anonymization support #159

Description

@SashankBhamidi

The anonymizer handles iCalendar (.ics) files. JSCalendar (RFC 8984) and jCal (RFC 7265) are now common enough that missing support is a real gap.

src/icalendar_anonymizer/formats/jscal.py for JSCalendar (JSON), src/icalendar_anonymizer/formats/jcal.py for jCal (JSON array format).

Both formats carry the same personal data as iCalendar: summaries, descriptions, attendee emails, organizer info, locations, URLs. The anonymization logic is the same. The format-specific code is just parse-transform-serialize.

JSCalendar support depends on calendaring-jmap being available for parsing. Add it as an optional dep:

[project.optional-dependencies]
jscal = ["calendaring-jmap>=1.0"]

jCal is a JSON representation of iCalendar and can be parsed without calendaring-jmap.

  • anonymize_jscal(data: dict) -> dict
  • anonymize_jcal(data: list) -> list
  • CLI: auto-detect format from file extension (.json with JSCalendar root key vs jCal array)
  • Tests for both formats with real-world samples
  • Docs: add JSCalendar and jCal to the supported formats section

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions