Previously, we set up a simple TODO list, because keeping things in a system of record beats keeping things in your head, every single time. Go ahead and review this setup so it’s fresh in mind. I will assume that most readers are like me and need refreshers from time to time. As a tool, Tinderbox definitely rewards regular usage.
So, TODO lists. After some amount of productive time, the list starts to get clogged up with lots of done tasks. If only there were some way to clear away the old ones. But we don’t want to delete them–one of our principles is to preserve rather than delete. So we’ll move tasks that have been complete for more than a week into a separate ‘done’ list.
Tinderbox has a powerful feature called Agents that can do this. Some folks have been intimidated by this feature, but today we’ll see how easy it can be.
We started out simple, with all list items at the top level in the document. The first thing we need to do is add two top level containers called ‘TODO’ and ‘Done’.
- We’ll do this in Map view. Right click below the title bar and select Map.
- Hit Return to create a new top-level container. Name it TODO.
- We need to move all the existing notes into this container. Select all with ⌘+A, then unselect the TODO note just created with a Command click on TODO. This will leave everything else selected. Then drag everything into TODO, which will change to look like a container.
- Switch back to Outline view to see your handiwork. The disclosure triangle will reveal all the tasks we had from before.
- With TODO still selected, hit Return to create a new sibling note, and call it Done.
It should look like this.
Now, as we complete tasks, we could manually drag over completed tasks to the Done container, but that would be a total…drag. Let’s get the system to manage this for us–it’s less error prone, and one less thing to worry about.
For Agents, there are a minimum of two things we need to configure.
- Select which notes to act upon
- Decide what to do with selected notes
So how do we select the tasks that are marked done? Every note has a wide-ranging set of metadata entries called Attributes, details of which we’ll get into later. We select notes based on Attributes. When starting out, you need to look around in some of the notes and see what Attributes distinguish notes in one category from those in another. In this case, we are looking for notes that have the “checked” attribute set to true.
As an aside, my original concept had a second facet to the rule, namely that the item should have been in the checked state for at least a week before getting shuttled to the Done list. This is a classic example of overthinking a problem. The solution involves keeping track of the timestamp when an item transitions into the checked state–something that is easy to add, but doesn’t come “out of the box”. We’ll come back to this feature later. Maybe. If we end up actually needing it. Tinderbox is great that way.
One way to get a feel for what attributes we have to work with is to expand the TODO list, then click on individual tasks underneath and context menu -> Get Info… Looking around here, I can see that the exact attribute we want is $Checked, which has a boolean (true/false) type.
Whenever you need to figure out how to do something in Tinderbox for the first time, there’s a moment of pondering how to actually do it. There is ample help available to figure out specific queries and actions. For one there is a dedicated help document available under Help -> Actions and Dashboards. Online, there is also a Tinderbox Cookbook with lots of useful info. Mark Bernstein’s book The Tinderbox Way also has a chapter about this, and if that’s not enough, a 3rd party website aTbRef contains a bounty of regularly-updated information.
Select the TODO container and select Note -> Create Agent. Name the agent “Move tasks to Done”. On this new agent, open the inspector (Window -> Inspector, or simply ⌘+1) and make sure the small gear tab is open. This is where we configure Agents and Rules.
In the textbox here, enter:
$Container=="/TODO/" & $Checked==true
You should see the indicator at the edge of the dialog showing how many items are found by this query. This is especially good for experimenting to see what works. For example, with a query of just $Checked==true, in my case, it was 36. However, since we plan to move notes around, we want to trigger on only those still in the TODO list. This is done with the $Container property, which uses a syntax just like files on your Mac. It starts with / called the root, and containers like TODO appear like directories, and an additional / character just before the name of the note.
Next up, the Action tab: this is where we describe the action to take. On that tab, enter the following:
$Container(original) = "/Done/"
Why “(original)” here? The agent itself is a container, but instead of holding actual items matched by the query, it contains aliases to the origials. Aliases work like symbolic links or Windows Shortcuts–they’re just a convenient handle to refer to a note that exists elsewhere. And we want the action to clear away the original note, not just the alias, into the Done list.
So with this change in place, clicking the checkbox to mark an item complete almost instantaneously whisks it away to the Done list. As a result, the TODO list stays shorter and easier to look at.
This same technique can be used in many other scenarios. This is one of the key advantages of Tinderbox, and the longer you use it, the more useful libraries you’ll build up
Coming soon: getting into revisions with help from Tinderbox.
Come see what I’m working on with Tinderbox–join Geeks, my Readers’ List. Free ebook for subscribers.