OmniPlate: ERB Templating for OmniFocus

I’ve been wanting the same kind of templating that the iOS versions of OmniFocus had on macOS for a while. I finally got that a few months back. This post touches on a project I actually completed quite a while ago. I just never got around to writing about it—even though the code for it is up in the OmniFocus repo. The project is called OmniPlate. It takes Taskpaper-formatted OmniFocus templates, runs them through the ERB preprocessor and then imports it into OmniFocus. Simple as that. It’s useful though. Aside from being a lot faster than an AppleScript templating system, the Taskpaper-formatted templates are native and easier to maintain. But after adding a little Ruby into the template, you can do any number of cool things.

If you’re not familiar with ERB, you just stick Ruby code in like so: <"%Y-%m") %>. Suddenly, you can add a formatted current date anywhere in the project. Then you can start setting defer and due dates with date math. You can use text filtering and processing to do anything you like. It’s infinitely flexible. You need to understand Ruby, but if you do, the sky’s the limit.

Protip: If you’re a LaunchBar user. Search for the template you want to run, and pass is to OmniPlate. After hitting enter, it’ll import it into OmniFocus. You can run it from the command line just the same. The script assumes ARGV[0] is the template, so feel free to splash ARGV[1] and so on into your templates and just pass them in after the templates to further customize your own stuff.

Check out the project on GitHub.

Published on September 5, 2017

Related Posts