Automatically Save An OmniFocus Project As iThoughts Mind Map

After I posted about my OmniFocus > iThoughts mind-mapping workflow, several readers asked whether it’d be possible to only convert a specific section of OmniFocus to iThoughts format (as well as plain text and OPML). As Robin Trew, creator of the script, explains in the Help section:

Specify a sub-tree by the OmniFocus id of its root node. Defaults to None.

You can, in fact, slightly modify the script  by adding an -a switch and the ID of a particular project to restrict the query to that project and its subtree. This will work if you only want to export a specific Project to mind-map; Contexts have a different subtree structure in OmniFocus’ database.

For instance, I only wanted to create a mind map for my MacStories project. To do so, I control-clicked on the project in the app’s sidebar, and selected “Copy As Link”; this will give you an OmniFocus URL like omnifocus:///task/oREye1BBxdg. The ID is the alphanumeric string after /task/.

Follow my tutorial, and add the -a switch as an additional filter:

python $HOME/ofoc_to_mindmap_018.py --output=$HOME/Dropbox/Maps/MacStories -m map.itm -c '0' --format=itmz -a oREye1BBxdg

Make sure to check out Robin’s script, as it’s much improved since the original release. You can also visit Robin’s website (and follow him on Twitter) for several AppleScript-related custom scripts and resources.

I save a lot of stuff into OmniFocus: bits of text, URLs, emails. I used to save favorite tweets into it, too. The app’s Quick Entry panel is so easy to invoke and so well-integrated with core parts of OS X  that, most of the time, I find myself clipping information that shouldn’t be into OmniFocus at all. However, I also find the process of manually going through that information beneficial to my workflow: it allows me to mentally and practically separate actionable items (tasks) from things to read and things to write (Instapaper material and my future articles, essentially).

I have created a simple AppleScript to send the selected OmniFocus task to a text file. The script is meant for how I use OmniFocus; hopefully you’ll find it useful as well. Feel free to modify it.

Typically, when I decide to go through my OmniFocus inbox, I find a lot of tasks that are actually ideas of things I want to do or write. Ideas don’t go into OmniFocus. Until those ideas become actionable items, I send them to a text file so I can elaborate on them and see if they can evolve. Like I said, most of the time those ideas are for new articles.

I store all my notes in a single Apps/ directory on my Dropbox. Based off the same AppleScript, I have created a Keyboard Maestro macro to create a new text file for each processed task; this is for ideas I know will turn out to be single, standalone articles. For ideas I’m not so sure about, I prefer to append them as text to an Ideas.txt file I keep in Dropbox as an “everything bucket” for inspiration. (more…)

Change Default Sync Times of OmniFocus For Mac and iOS

In my post about OmniFocus and flagged Mail.app messages, I wrote that there’s no way to tell the app to sync every few minutes. I was wrong. As reader Bill Pallmer told me, there are two settings to change the default sync behavior of OmniFocus for Mac. In Terminal, you can use these commands to change how often OmniFocus will start a new sync and sync after an edit, respectively:

defaults write com.omnigroup.OmniFocus MaximumTimeBetweenSync -float 30
defaults write com.omnigroup.OmniFocus TimeFromFirstEditToSync -float 2

The numeric value after the -float flag indicates time in seconds. As explained by Ken Case on The Omni Group forums, you’ll have to quit and restart the app after using these in Terminal; you also can’t go lower than 2 seconds for TimeFromFirstEditToSync and 15 seconds for MaximumTimeBetweenSync.

There are two hidden preferences which control the timing of automatic synchronization, MaximumTimeBetweenSync and TimeFromFirstEditToSync. Both are specified in seconds. MaximumTimeBetweenSync is how often OmniFocus looks for changes on the server when no changes have been made locally; it defaults to 3600 seconds (one hour). TimeFromFirstEditToSync is how soon OmniFocus will sync after you’ve made an edit, and it defaults to 60 seconds (one minute).

If you have the Mac App Store version of OmniFocus, change the first part of the command to com.omnigroup.OmniFocus.MacAppStore.

The great thing about these commands is that they also work on iOS in debug mode. They share the same name and settings, but a different URL:

x-omnifocus-debug:set-default:TimeFromFirstEditToSync:2

x-omnifocus-debug:set-default:MaximumTimeBetweenSync:30

To activate the iOS settings, choose the value you want, and paste the URL into Safari: OmniFocus will open and tell you that you’re enabling a debug option, as pictured above. The app will quit; restart, and it’ll now sync more often according to how you changed the default setting. Obviously, remember that you’ll be consuming 3G data for sync, so don’t set it to refresh too often, unless you don’t have a problem with that.

To revert to factory settings on iOS, use:

x-omnifocus-debug:reset-default:MaximumTimeBetweenSync

This is a great tweak, because I run my own OmniFocus sync server for a variety of reasons, and I always want to make sure I have the latest version of my database. Thanks Bill.

Send Flagged Mail Messages To OmniFocus Automatically

Sven Fechner pointed today to an AppleScript published in late 2011 by Hunter Hillegas to send flagged Mail.app messages to OmniFocus’ inbox on the Mac.

In iOS 5, Apple added the ability to flag a message, just as you’ve been able to do on the desktop forever. I created an AppleScript that looks for flagged messages. When it finds them, it adds them to OmniFocus and links them back to Mail.app, just like the Services action does. It then also unflags the message, resetting the state back to normal. This script runs every five minutes.

In iOS 6′s Mail.app, it’s now even easier to mark a message as flagged. I have tried the script, and it works as advertised. I would modify it to include only the latest message of a thread in the task note, but I see the appeal of having an entire conversation saved in OmniFocus for reference.

Obviously, the script is best enjoyed if executed on a Mac that’s running all the time. In this way, you can set a message as flagged on iOS, wait a few seconds, and find it in OmniFocus right away.

Personally, I run my own OmniFocus sync (every minute) so that I always have up-to-date sync that I can control. To implement this script in my workflow, I just had to create a new Keyboard Maestro macro (pictured above) that runs the AppleScript every minute if I’m logged in. In the way the script is designed, flagged messages are processed, then set back to “unflagged” so they won’t be added again in the future (unless you flag them manually).

You can find the AppleScript here.

iThoughts for OmniFocusA few weeks ago, Michael Schechter found a way to export an OmniFocus for Mac database to OPML to visualize it in mind-mapping apps like iThoughts and MindNode. In the post, he wrote that, however, he was reaching to the Mac community to see if anyone would be able to build a more powerful and reliable solution with filters, color options, and more control on the exported data. RobTrew picked up the task and, on the OmniGroup Forums, released an initial script to export from OmniFocus to OPML.

Then, yesterday, Rob released a new version of the script which adds native iThoughts support and plain text exporting options, as well as settings for colors, templates, and filters.

I tested Rob’s script with my OmniFocus database, and after several improvements he made to the script, I feel comfortable enough with linking to it here. Unlike other solutions, Rob’s script looks directly into the SQL OmniFocus database cache to get its data — quite a feat on its own. But there’s so much more the script can do if you start customizing it. (more…)

OmniFocus Browser Bookmarklet and Safari 6

Ever since upgrading to Safari 6 and Mountain Lion, I’ve noticed the OmniFocus bookmarklet I had installed stopped working properly. The OmniFocus bookmarklet is a handy addition to my workflow, in that it allows me to quickly save webpages I need to act upon at a later date, while preserving their title, link, and text selection. I often do this for linked posts that end up here on MacStories, or pages that I need to check out but that I’m not ready to bookmark yet (for that, I use Pinboard).

In theory, the OmniFocus bookmarklet should be capable of grabbing a webpage’s URL and selection (if any) as a note. However, of the two bookmarklets provided by The OmniGroup, none of them manages to successfully grab text selection on my machine running Safari 6 and OS X 10.8.1. So I set out to find a better bookmarklet, and I found this version by Alex Popescu that, besides working correctly, has also some nice integration with Gmail.

For Gmail, the bookmarklet creates a new task with the email title as the task title and a note with the current selection (if any), plus a from line in the form: From: email subject:(email subject) email_thread_url. For normal web pages, the bookmarklet creates a new task with the document title as the task title and a note with the current selection (if any), plus a from line in the form: From: page_url.

I tested this on Safari 6, and it works as advertised. The bookmarklet also works on iOS devices, albeit the iPhone’s Mobile Safari can’t send the current text selection from a page to OmniFocus.

Get the bookmarklet here.

Back in October 2010, I posted a tutorial on how to add new tasks to OmniFocus or Things using Dropbox, AppleScript, and PlainText by Hog Bay Software. In June 2011, I wrote about more ways to add tasks to OmniFocus (my GTD app of choice), and noted how I had only “scratched the surface of what’s possible to do with OmniFocus and task creation”.

I decided to slightly revisit my workflow now that several “quick Dropbox note-taking apps” like Scratch and Drafts have come out. These apps are already integrated in my daily routine, but the following method works with any text editor, and, obviously, using Dropbox is recommended if you want to be able to create tasks from anywhere. (more…)

Aug
31
2012

In my daily “social networking workflow”, I use the “favorite” feature of Twitter as a todo list of sorts. I couldn’t find a way to add favorites to OmniFocus without leveraging email as a bridge, so I built a solution myself.

Using IFTTT, a single line of bash, Hazel, and AppleScript, I created a simple way to turn a favorite tweet into an OmniFocus task in the application’s inbox, ready for future processing. As an extra, I have also created a more “advanced” version that adds Automator to the mix to only extract URLs from favorite tweets. (more…)

Save Safari Tabs As A List in OmniFocus

This is a nice tip to save the tabs of the frontmost Safari window as a list in OmniFocus (via Shawn Blanc). Through AppleScript, tabs are saved as webpage titles and URLs in a note in the OmniFocus inbox; the note is named with the ”URL List from Safari Tabs” + timestamp format.

Using OmniFocus’ AppleScript Dictionary, you could modify the script to assign a specific context to the task for easy retrieval of your tab lists with Perspectives or OmniFocus’ own URLs. For the latter option, you can use Launch Center on iOS to quickly jump to OmniFocus projects and contexts; also keep in mind that any OmniFocus item (a task, a project, a context) has a unique ID that you can get using the “Copy as Link” option from the app’s contextual menu.