Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coverage and support for user-defined attributes #30

Open
tbabej opened this issue Jan 17, 2015 · 3 comments
Open

Add coverage and support for user-defined attributes #30

tbabej opened this issue Jan 17, 2015 · 3 comments

Comments

@tbabej
Copy link
Member

tbabej commented Jan 17, 2015

Even though one can use user-defined attributes with tasklib, we:

  • Do not provide any official interface for them (one has to update the config dict). This maybe does not need to change.
  • Do not cover the use case in tests
@tbabej tbabej changed the title Add coverage for user-defined attributes Add coverage (and support?) for user-defined attributes Jan 17, 2015
@tbabej
Copy link
Member Author

tbabej commented Jan 17, 2015

Some support will be needed though, since UDAs can have date values, and we need to serialize/deserialize that.

@tbabej tbabej changed the title Add coverage (and support?) for user-defined attributes Add coverage and support for user-defined attributes Jan 17, 2015
@thehunmonkgroup
Copy link

Would love to see this implemented. As a workaround, I thought I'd post the hack I'm using to handle deserializing UDA dates:

import datetime
from tasklib.serializing import SerializingObject
serializer = SerializingObject({})
# dt is the UDA value I get from tasklib, I detect if it's already a datetime
# object for forwards-compatibility.
dt = dt if isinstance(dt, datetime.datetime) else serializer.timestamp_deserializer(dt)

@allgreed
Copy link

allgreed commented Mar 6, 2024

Do I correctly presume that there is no builtin way to parse the UDA of duration type? That'd be really nice to have as well ;)
I'm hand coding a minimal enough parser, however a properly tested (and implemented) one would be fully in order.
allgreed/tw-ical-feed@1af68f7#diff-b10564ab7d2c520cdd0243874879fb0a782862c3c902ab535faabe57d5a505e1R63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants