TECHNOLOGY NOTES

Find Me

Search

Buy TapCellar on the App Store

Latest articles from Technology Notes

A Taskpaper Today Perspective

One of the best things about OmniFocus is Perspectives. It is something I relied heavily upon during the time when I was using it and, after moving to a text-based method of tracking tasks and projects, it was one of the few things I missed.

It is pretty easy to make do with not having a Perspective like this on the Mac. You can run some Sublime Text commands like “Fold with Regex” or “Find with Regex” to track down and filter the things you need to do. On iOS, however, the need is a bit more tailored. If you want to see your tasks across multiple taskpaper files, you need to open Editorial and check each one, filtering as you go. It was not ideal but since the overall need was being met, I didn’t mind that much.

A few weeks ago, I started thinking about a way to skim through all of my taskpaper files, adding target tasks to a single file which would be a static form of my OmniFocus Today perspective. This way, I would only need to focus on one file in Editorial to see what I had to do on a given day. I wasn’t editing the files in Editorial for the most part anyway. It was just a window into the taskpaper files that were tracking everything.

I’m not really a guy who writes code anymore. I used to write it like it was my job1 but as I moved to more managerial positions, the opportunities to write code grew less and less frequent. That is a preamble to the presumably-awful code stored in this gist:

Python Today Tasks Perspective

Here’s what it does:

  • Open up whatever taskpaper files you want to add to your daily “Today perspective” file, called “tpToday.taskpaper”.
  • Start building the text for a new file.
  • First add a timestamp. This helps you know the file was generated recently in Editorial. It is more for debugging than anything.
  • Loop through your taskpaper files and look at each line.
  • If it is a project, remember it.
  • If it is a task and matches a target regex (see below), check to see if it is a different project from the last one
  • If so, add the current project name (from the last step) and then append the task otherwise just add the task to the file.
  • After all files are read, stream the new contents to the tpToday.taskpaper file.

The way I am determining if a task makes it into the file or not is via this regex line. It is built up via trial and error and some feedback from a reader (thanks, Thomas!)

"((@+\\bcritical*)|(@+\\btoday*)|(@+\\bhigh)|(@+\\bdue\(" + today + "\)))(?!.*@done)"

Eventually, I will add some code to look at the dates and find all overdue tasks with dates prior to today’s date too. Baby steps.

The result is a list of tasks organized by file, then organized by project. You can skim through them easily and quickly. The addition of the file and project names keeps you anchored and oriented in a way that a simple line-filtering routine from within Editorial wouldn’t accomplish easily.

Now that the script was working, I created a job on my Mini that triggers when my taskpaper files change.

So far, this has has been working for a few weeks and it has been really helpful. Once the date math is added, I’ll have the exact view of my tasks and projects that I had in OmniFocus. It went against my “stop fiddling” mantra but it is actually saving me a lot of time going back and forth between files so it was worth the effort.

I was reticent about using an automated task to handle this – checking for file changes every x minutes seemed like a lot of needless overhead. Thankfully the Lingon option to fire a task when a file changes is a perfect compromise.


  1. It was. 

Back to the iPhone 5S

Last week I switched from an iPhone 6 back to an iPhone 5S. So far, so good.

I got an iPhone 6 on launch day and was impressed by the build quality. I really liked the rounded, non-chamfered edges and the phone felt like a smooth river stone in my hand. It was a bit too slippery, especially on cold days, and the result was the purchase of my first phone case in years solely to avoid dropping the phone regularly.

ApplePay will hopefully change the way we do our personal retail business transactions. Despite high hopes, my exposure to it since the iPhone 6 release has been minimal. The opportunities to use it going forward probably won’t be significant for me given that I do relatively little retail shopping. Most of my transactions are in restaurants and pubs which still have no facility to handle ApplePay and, while I would love to fuel my car and pay with a wave of my phone, those days still seem far off.

The iPhone 6 screen always felt a bit like it wasn’t made for my hands like the iPhone 5S was. The iPhone 4 and 4S were tiny and I could easily reach any area of the screen. My resistance to the iPhone 5 gave way to the fact that I could still reach the top left corner while holding my phone in the right hand. The iPhone 6 requires you to shift the phone in your hand, balance it on your fingertips and then stretch across to hit the top left of the screen one-handed. The whole time you are courting disaster.

Apple added the laughable “reachability mode” but that was something I usually triggered by accident, costing me more time than it saved. It also served as an aggravating software reminder that the iPhone 6 was not made for me.

Moving back to the iPhone 5S has reaffirmed my feeling that it is the current high point in smartphones. It is the best balance in speed, battery life, size and durability.

Eventually I want a smaller phone. Ideally it would also be a lighter phone, a phone that is more durable and with more battery life. A phone that disappears into my pocket rather than takes up every spare inch of it. For now, and for the foreseeable future, the iPhone 5S will be my main phone and I don’t regret the decision to move back to it one bit.

Nerds on Draft — Episode 017

Gabe and I drink a Fiddlehead Mastermind while discussing the topic of recommendations and reviews in episode 17 of Nerds on Draft.

The Mastermind was a contribution of a listener who also contributed some amazing tools to analyze the data in your personal TapCellar data set.

I give this podcast a five star review.

Macdrifter — PlainTasks for Sublime Text 3

Relevant to my current interests (Sublime Text 3 and PlainTasks), Gabe posted yesterday that a new version of PlainTasks was released and it has some really cool new features.

If you have been monkeying around with the “one hammer” approach I have been taking to task management lately, this will give you a few more ways to help you organize your task list in ST3.