In a previous blog post entitled Adding an efficient, higher-level project view layer to Things 3: a proposal , I put forth that while Things 3 is a great task manager for day to day activities, it is not ideal when a higher altitude view is needed. However a visual presentation with key information, at the project level, would accomplish this task without the need for a more complicated project manager application. In this post, I have taken a first step toward getting to that point by extracting the necessary information out of Things.
Cultured Code has made available an extensive documentation for extraction information from Things using AppleScript. I am in fact using it extensively to automate many processes on my Mac (I use Automator to make the scripts available system-wide and associated to key combinations…but this is for a future post!). For those interested in what you can do, here is the link to the official documentation: Things AppleScript Guide – Cultured Code.
However, with very little effort (read Google search!), I found out that Things database is actually a SQLite3 database. Lo and behold, you can view it directly using application like DB Browser for SQLite. It also means that if you have Xcode install, you can query that database yourself. Alexander Willner has done just that and made the framework available on GitHub. Since the package can be install via brew. I had to try it. Installing and issuing the command things.sh stat gives the results shown below.
Now having said that, even better sqlite3 is part of the standard Python library and, yes, Python is on your Mac (with Xcode installed)!!!
I decided to have a little coding project during my vacation, dedicating a few hours to extracting information from my Things3 database using Python. Following the guideline I set forth in Part I, the idea is to extract just the information relevant for the Kanban view described in that document. Well, it turns out it was relatively easy and here is the output of my Python script:
Notice that out of 115 projects (from things.sh above) only 40 have a due date attached to them (the others are collection of tasks in the GTD sense) and those projects currently have 121 active tasks associated to it, ranging from 0 (this is me needing to review my projects but since I am in vacation, it will be done slowly in the coming days) to a high 25. Yes, I displayed only the uuid of the projects instead of the project names, so that there is no need to go to Photoshop for privacy(!).
However, I now have in a single tuple: the project names, due date, uuid (so that I can construct a link back to Things3 from anywhere!) and the number of active tasks under each project. I basically have all the necessary information that I requested in my mock-up Kanban view (below):
Now the more difficult part (as least for me), I am in need of a graphical representation to transform my tuple into a nice visual Kanban representation for easy review…
Any volunteer to help?