Skip to content

feat: list --json outputs jCal (RFC 7265) - #83

Merged
tobixen merged 3 commits into
masterfrom
feat/json-output
Oct 23, 2026
Merged

tobixen merged 3 commits into
masterfrom
feat/json-output

Conversation

@tobixen

@tobixen tobixen commented Oct 21, 2026

Copy link
Copy Markdown
Member

Closes #82

Commit message:

feat: list --json outputs jCal (RFC 7265)

Template output is awkward to feed to scripts and AI agents.  The
icalendar library can serialise to jCal, the standard JSON form of
iCalendar, so `list --json` reuses the `--ics` path with that
serialiser.  An empty selection gives an empty calendar rather than no
output.  This requires icalendar 7.0.0.

That path now builds a fresh calendar holding each VTIMEZONE once,
rather than appending everything into the first object's cached
instance, so `--ics` no longer repeats timezones either.

https://github.com/pycalendar/plann/issues/82

Prompt: latest issue wants output in json, that's a fair request, please fix

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>

🤖 Generated with Claude Code

Template output is awkward to feed to scripts and AI agents.  The
icalendar library can serialise to jCal, the standard JSON form of
iCalendar, so `list --json` reuses the `--ics` path with that
serialiser.  An empty selection gives an empty calendar rather than no
output.  This requires icalendar 7.0.0.

That path now builds a fresh calendar holding each VTIMEZONE once,
rather than appending everything into the first object's cached
instance, so `--ics` no longer repeats timezones either.

#82

Prompt: latest issue wants output in json, that's a fair request, please fix

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
Ruff (I001) wants a blank line between the stdlib and the first-party
imports in the new list --json tests, which broke CI on
#83

Prompt: The CI fails

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
setuptools-scm's default describe picks the nearest tag containing a
digit, so a local non-release tag (a date-stamped backup, say) could
become the version and break builds with "Can't parse version from
tag". Restrict describe to release tags. The legacy 0.11.0 tag, with
no "v", is ignored from now on.

Prompt: For some of my python-libraries, the [local backup] tag can break local hatch-vcs builds, because hatch-vcs tries to read it as a version number.  This has been fixed somewhere but not everywhere.  Please check [and] fix it wherever it's relevant

Assisted-By: Claude Opus 5.5
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
tobixen added a commit that referenced this pull request Oct 23, 2026
CI's ruff flagged an unused os import in cli.py and two unsorted
import blocks; this applies its own fixes.

Prompt: do the needful. [merge the open PRs #80, #81 and #83 before a release; CI on 81 was red]

Assisted-By: Claude Opus 5.5
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
@tobixen
tobixen merged commit 0dea96e into master Oct 23, 2026
9 checks passed
@tobixen
tobixen deleted the feat/json-output branch October 23, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Json output

1 participant