From a4d5a2372bf1f05699e93db42d0db559e8480194 Mon Sep 17 00:00:00 2001 From: David Barnett Date: Wed, 25 Sep 2024 11:27:53 -0600 Subject: [PATCH] ical: fall back to 30m duration + info message for evs w/o end/duration --- ChangeLog | 1 + gcalcli/ics.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 05a2a7a..f448dd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ v4.5.0 reading an rc file you needed * The `import` command now dumps events it couldn't import into a tmp rej.ics file in a tmp directory for convenient retries + * `import` can also handle events w/o a dtend, using duration if available * Determine date format to use based on system locale's in "When" inputs * Respect locally-installed certificates (ajkessel) * Re-add a `--noauth_local_server` to provide instructions for authenticating diff --git a/gcalcli/ics.py b/gcalcli/ics.py index c1f0649..d7d7924 100644 --- a/gcalcli/ics.py +++ b/gcalcli/ics.py @@ -123,7 +123,11 @@ def CreateEventFromVOBJ( if hasattr(ve, 'duration') and ve.duration.value: duration = ve.duration.value else: - duration = timedelta(minutes=0) + printer.msg( + "Falling back to 30m duration for imported event w/o " + "explicit duration or end.\n" + ) + duration = timedelta(minutes=30) if verbose: print('Duration.....%s' % duration) end = ve.dtstart.value + duration