tasklib icon indicating copy to clipboard operation
tasklib copied to clipboard

Automatic parsing of time-related UDAs

Open allgreed opened this issue 1 year ago • 2 comments

I'm doing a taskwarrior integration utilizing tasklib and there are UDAs in play. UDAs of type date and duration. They're represented as Python strings when acquired task["my_uda"], but I don't think this has to be the case - they could come out as datetime and timedelta IMO. Right now I'm parsing them manually in my integration, but actually this could be implemented in tasklib.

I'd be up for the job, however would like to first consult with some more experienced with the codebase - does it seem like a stupid idea due to architectural concerns or something else?

allgreed avatar Jul 27 '24 17:07 allgreed

The library appears to be stalled since 2022... I have simple PRs that have sat since then with no one looking at them. The last commits were in 2022. Furthermore, with TW3, it's possible this whole library will eventually wrap the database rather than TW itself, and/or be superseded by other interfaces.

Ironically this was the same problem that drove me from Ralph Bean's library to this one (I have PRs over there in same state) and then it happened to this one too.

Just saying, if you submit the PR, be prepared to work off your own copy for a while, possibly years or forever.

smemsh avatar Jul 28 '24 00:07 smemsh

@smemsh Cool, thanks for letting me know - if that's the case I think my time would be more productively spent elsewhere

For posterity, maybe this saves someone some time: https://github.com/allgreed/tw-ical-feed/blob/master/main.py#L44 <- parsing date UDA into datetime https://github.com/allgreed/tw-ical-feed/blob/master/main.py#L65 <- parsing duration UDA into timedelta

allgreed avatar Jul 29 '24 14:07 allgreed