mvgrimes / obsidian-todotxt-plugin

Obsidian plugin to manage todotxt files
MIT License
54 stars 4 forks source link

Support some of the common keys #3

Closed pcause closed 1 year ago

pcause commented 1 year ago

many todo.txt implementations add keys and two common ones are:

r:value - r means recurring. the value is an integer followed by one of d,w,m,y for days, weeks, months, years. the increment is added to the done date. so r:2d means create a new item with a due date of 2 weeks from when done. some implementations use a + before the value to mean "strict" which says use the original due date if the done date is past then original due date.

t:value - t means start and value is YYY-MM-DD. this gets incremented in new items created by recurring tasks.

mvgrimes commented 1 year ago

This is interesting. Can you provide links to todotxt implementations that support these?

pcause commented 1 year ago

there are a ton of todotxt apps out there. ,amy don't have web pages for docs. but here is an example and mnay use these

https://swiftodoapp.com/todotxt-syntax/recurrence/

Serneum commented 1 year ago

I've also been looking for t: and rec: (as opposed to r:, but either would work for me) after reading up on the syntax that SwiftoDo provides. It looks like it's in your "To Come" section, but just wanted to throw support behind this.

mvgrimes commented 1 year ago

I'm releasing a 1.4.0 shortly with support for recurring tasks (rec:) and thresholds (t:). They are marked as experimental and need to enabled in the configuration. I'd appreciate feedback if you have can test it out.

Serneum commented 1 year ago

I'm releasing a 1.4.0 shortly with support for recurring tasks (rec:) and thresholds (t:). They are marked as experimental and need to enabled in the configuration. I'd appreciate feedback if you have can test it out.

Tried this earlier and was a little confused initially because I assumed recurring tasks would be based on the due date and not the completed date. It might be nice to have a configuration option to change to be based on the due date. Otherwise, initial testing looks good for rec: image

mvgrimes commented 1 year ago

I think that's a bug. It should only use the complete date if there is no due date.

pcause commented 1 year ago

many of the todo.txt implementations support both "when done" and "from due date". The default is set new date from completion date. From "strict" mode, meaning use the due date not the completion date, add a "+" before the interval specification. So:

rec:1w - next item due is one week from completion rec:+1w - next item due is 1 week from original item due

Serneum commented 1 year ago

From "strict" mode, meaning use the due date not the completion date, add a "+" before the interval specification. So:

rec:1w - next item due is one week from completion

rec:+1w - next item due is 1 week from original item due

Got it. Strict mode did the trick. I wasn't sure what the use-case was for strict mode from the docs for the plugin but that makes sense