Hey folks,
I’m working on packaging my task/project management macros as a plugin. This tutorial does much of what I’ve already been doing, but I’m trying to add a new task button and am wondering if there’s a way to take a filter like [tag[Combat]tag[Monster]]
and extract a list of included tags? Failing that, is there some way to make what I’m doing work?
Essentially, I have this macro for listing tasks:
\define task-list(filter)
<ul>
<$list filter="[tag[task]$filter$sort[]]">
<li><$checkbox tag="done"> ~~ <$link/>~~</$checkbox></li>
</$list>
</ul>
\end
I then have this to create a dashboard of done and undone tasks:
\define task-dashboard(filter, title:"Tasks")
<details>
<summary><h3>$title$</h3></summary>
<<new-task-button>>
<details>
<summary><h4>Open</h4></summary>
<<task-list "$filter$!tag[done]">>
</details>
<details>
<summary><h4>Closed</h4></summary>
<<task-list "$filter$tag[done]">>
</details>
</details>
\end
For creating new tasks:
\define new-task()
<$action-sendmessage $message="tm-new-tiddler" title="New task" tags="task" />
\end
\define new-task-button()
<$button actions=<<new-task>>>New task</$button>
\end
What I’d like to do is something like <<task-dashboard "tag[distribution]tag[steam]">>
to filter tasks. Dashboards include a button to create new tasks tagged with whatever tags are included in the dashboard filter, but obviously this won’t work because the action triggered by the button wants a list of tags, not a filter.
Thoughts on a path forward? I guess I can ditch the idea of using filters everywhere and instead accept a list of tags, but then I have the opposite problem in that I don’t know how to go from a title list of tags to a filter.
Also just open to any general suggestions of how to make this better. I’m aiming for a simple task tracker so I can go from tiddlers linked from a design document, to checklists of tasks possibly with completion percentages (but obviously those aren’t there yet.)
Thanks.