You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0dea96e
Browse filesBrowse the repository at this point in the historyBrowse files
Merge PR 83: feat: list --json outputs jCal (RFC 7265)
#83
list --json outputs the selection as jCal (RFC 7265), the standard
JSON form of iCalendar, for scripts and agents. Requires icalendar
7.0.0, and --ics no longer repeats each timezone. Also restricts the
hatch-vcs version lookup to v[0-9]* release tags.
Commits:
- 3ed3991 feat: list --json outputs jCal (RFC 7265)
- 34d4768 style: sort imports in the jCal tests
- beceb09 build: only take versions from v[0-9]* tags
Fixes#82
Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ and I do try to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
7
7
8
8
### Added
9
9
10
+
*`list --json` prints the selection as jCal (RFC 7265), the standard JSON representation of iCalendar. https://github.com/pycalendar/plann/issues/82
10
11
*`plann freebusy-sync`: keeps a copy of the busy time from one set of calendars in another calendar, holding only the time and a fixed summary. Copies are moved and deleted as the source changes, so it can run from a timer in both directions between a work and a private calendar. See the user guide.
11
12
12
13
### Deprecated
@@ -18,12 +19,13 @@ and I do try to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
18
19
* Completing a task (`edit --complete`, `complete` in the interactive and multi-edit modes, `completed!` in `set-task-attribs`) now also completes its pending child tasks, recursively, and prints a warning for each. A child has to be done before the parent can be completed.
19
20
*`completed!` in `set-task-attribs` moves a recurring task on to its next recurrence, like `edit --complete` does, instead of completing the whole series.
20
21
* Shell tab completion scripts (bash, zsh, fish) now ship with the package. They work without shell configuration for system-wide installs (and for bash user/venv installs with bash-completion 2.12+); see the README for other setups. The `make install-completion` targets are gone.
21
-
* icalendar 6.2.0 or newer is required.
22
+
* icalendar 7.0.0 or newer is required.
22
23
* caldav 3.6 or newer is required. The config file is now read as caldav 3.6 reads it, so it may also use `kind: caldav` sections with plain keys, `password_command` (a program printing the password) and `password_keyring`.
23
24
* The config file is found on the search path shared with the caldav library and other tools: `~/.config/pycal/calendar.yaml` first, then caldav's paths, `~/.config/calendar.conf` and `/etc`, or the file `CALENDARING_CONFIG_FILE` / `CALDAV_CONFIG_FILE` names. Before, plann read `~/.config/calendar.conf` only, so with several of these files a different one may be used now. `plann configure` creates `~/.config/pycal/calendar.yaml` when there is none, or when the file it found cannot be written (one under `/etc`), and makes the file readable by its owner only.
24
25
25
26
### Fixed
26
27
28
+
*`list --ics` repeated the VTIMEZONE of every listed object, instead of giving each timezone once.
27
29
*`interactive set-task-attribs` (also run by `interactive manage-tasks`): a task marked `completed!` at one prompt was asked about again at the next one, and answering `completed!` there crashed on the already-completed task. Regression in v1.2.0.
28
30
*`list-categories` and timewarrior time tracking crashed on a task with more than one CATEGORIES line. https://github.com/pycalendar/plann/issues/71
29
31
*`{CATEGORIES}` in a `list --template` printed the internal `vCategory([...])` representation instead of a comma-separated list.
Copy file name to clipboardExpand all lines: USER_GUIDE.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,13 @@ Some calendar server implementations require `--todo` or `--event` to always be
109
109
110
110
### Listing objects
111
111
112
-
Events can either be output as ics, or through a template.
112
+
Events can either be output as ics (`list --ics`), as json (`list --json`), or through a template.
113
+
114
+
The json output is jCal, the standard JSON representation of iCalendar (RFC 7265). It holds everything the ics output holds, and is easier for scripts (or AI agents) to work on than template output:
115
+
116
+
```
117
+
plann select --event --start=today --end=+7d list --json
118
+
```
113
119
114
120
The templating engine is built on top of the python `string.format()`. To learn the basics of `string.format()`, w3schools has some nice interactive thing on the web, https://www.w3schools.com/python/ref_string_format.asp
0 commit comments