[tw_gcal_sync] [Feature request] Use UDA for event duration?
Hello once again!
Do you think it would be possible to use a user-defined attribute to specify the duration that a gcal event should have? Having a 1-hour default sometimes may take a lot of space in the calendar for some menial tasks.
Thanks!
pd: I think that even the taskwarrior "duration" datatype could be used with little work, as it uses the same format (ISO-8601) as the "duration" attribute of the calendar specification
Hi @Petemir ,
Yeah, sounds like a reasonable request. If you want to provide a patch, have at it, otherwise I 'll deal with it once I find some spare time :)
Hi @Petemir , this is implemented among some other work I had been doing in this branch: https://github.com/bergercookie/taskwarrior-syncall/tree/gkeep-fs
For now it's not available as a package since it requires this PR (https://github.com/ralphbean/taskw/pull/160) to be merged first.
I'll close this ticket once I merge it and have a package ready. Until then, if you wantto try it you have to checkout that branch and point the taskw reference in pyproject.toml to a locally downloaded version of taskw that uses my taskw remote (https://github.com/bergercookie/taskw)
@bergercookie Sorry! Got caught up with the end of the semester :). I'll try to check it, thank you very much!
This should now work as part of v1.4.0. The package is renamed to syncall so you'll have to remove the previous one and install the new one like this:
pip3 uninstall taskwarrior-syncall && pip3 install --upgrade syncall
syncall is now aware of the twgcalsyncduration UDA:
To make it a bit more user friendly the user can also add the following section to their .taskrc:
uda.twgcalsyncduration.type=duration
uda.twgcalsyncduration.label=GCal duration
You can assign a custom duration to a taskwarrior task using something like the following:
# create a task ...
# Make this a 15min task
task <id> mod twgcalsyncduration:15M
Then on subsequent runs, it will create an event of the said duration in google calendar.
You can also edit the default event duration using the --default-event-duration-mins INTEGER flag (specify it in minutes)