GothenburgBitFactory / tasklib

A Python library for interacting with taskwarrior databases.
http://tasklib.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
146 stars 27 forks source link

Automatic parsing of time-related UDAs #131

Open allgreed opened 1 month ago

allgreed commented 1 month ago

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?

smemsh commented 1 month ago

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.

allgreed commented 1 month ago

@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