diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2020-07-07 20:09:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 20:09:10 +0200 |
commit | 70354a3ddd170cb724aef918ca37f28fd791e36c (patch) | |
tree | 4afb6a222b4a6d4d30e6b8668fce7b95bf060e7a | |
parent | 13c2616de265ead2ae6be6359f9f656a1474eeb6 (diff) | |
parent | cbc9af03b479fe0931e6585737a1d826e27a71c5 (diff) | |
download | calendar-cli-70354a3ddd170cb724aef918ca37f28fd791e36c.zip |
Merge pull request #77 from bug/master
Private events
-rwxr-xr-x | calendar-cli.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/calendar-cli.py b/calendar-cli.py index 6e323f1..a6c16d1 100755 --- a/calendar-cli.py +++ b/calendar-cli.py @@ -350,6 +350,8 @@ def calendar_add(caldav_conn, args): event.add('dtstart', dtstart) ## TODO: handle duration and end-time as options. default 3600s by now. event.add('dtend', dtstart + timedelta(0,event_duration_secs)) + if (args.private): + event.add('class', 'PRIVATE') event.add('dtstamp', _now()) uid = uuid.uuid1() event.add('uid', str(uid)) @@ -910,6 +912,7 @@ def main(): calendar_add_parser.add_argument('summary', nargs='+') calendar_add_parser.set_defaults(func=calendar_add) calendar_add_parser.add_argument('--whole-day', help='Whole-day event', action='store_true', default=False) + calendar_add_parser.add_argument('--private', help='Private event', action='store_true', default=False) for attr in vcal_txt_one + vcal_txt_many: calendar_add_parser.add_argument('--set-'+attr, help='Set '+attr) |