-
-
Notifications
You must be signed in to change notification settings - Fork 81
feat: support custom report dataformat like Taskwarrior #636
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
base: main
Are you sure you want to change the base?
Conversation
@kdheepak Sorry, should have tagged you on this draft. |
I think this is great! Thanks for implementing a draft, I'd be open to adding this feature. My first thought is I'm not sure if all taskwarrior dateformats can be converted to chrono. If we can get a fallback for when that happens that would be good enough I think. |
Thank you! I'll work on polishing it up and mark it when it's ready. I have a few other improvements I could work on and thought this would be a good one to get familiar with the project. Big fan! |
e77ef8c
to
aa1f493
Compare
Okay, this should be ready! All of the taskwarrior date formats (https://taskwarrior.org/docs/dates/) are mapped to chrono (https://docs.rs/chrono/latest/chrono/format/strftime/index.html) formats, and any other characters just get passed through raw. If no format is provided we fallback to the existing |
These errors are from a file I haven't touched. Want me to fix them in this PR or another one? |
If you can fix this in this PR that would be awesome! But no worries, I can also look at them later. |
Fixed! I was on cargo |
Just want to check over a few more things. |
Thanks for all the hard work on taskwarrior-tui!
I thought it would be nice if tw-tui supported taskwarrior's
report._.dateformat
option. This PR reads this configuration parameter and uses it when formatting thedue
task property.The only slight complexity in implementation is converting from Taskwarrior's date formatting to
chrono
date format. I want to spend a little more time cleaning this up, but wanted to post this draft PR to see if this is an acceptable feature to add.-jacob