The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
A faster export of all active OmniFocus task to OPML Thread Tools Search this Thread Display Modes
There has been some recent discussion of exporting all active OmniFocus tasks to OPML for review in mind map software.

Another script on this forum (originally intended for exports of GUI-selected projects and tasks) can more or less be cajoled into exporting the whole set of active data, but takes several minutes to do this through the Applescript interface.

Here is a script which takes a different approach, using Python to read the Sqlite cache.

Note: requires OS X 10.7 and above (Python 2.7)

The export now only takes a second or two on my system, but in the current version only exports (by default) the names and notes of all the active folders, projects and tasks (i.e. it's currently skipping dates, contexts etc).

If you edit the following line at the top of the script:

Code:
property pIncludeLinks : 0 -- 0 to omit  links to OF tasks, 1 to include them
You can request the script to include links of the form:

Code:
omnifocus:///task/o49Lh0LPVjA
On the iPad, iThoughtsHD will then link each node to the corresponding task in OmniFocus for iPad. Holding a finger down on the iThoughts node for a second or two will enable you to jump straight to the relevant task in iPad OmniFocus.

Why not include export of links as a default ?

Well, including links will mean that every iThoughtsHD node has a tiny green globe at the corner (haven't found a way of switching this off :-) and will add few seconds both to the initial export from Desktop OmniFocus to OPML, and to the time it takes iThoughtsHD to read the OPML in.

A pre-alpha draft. Suggestions and bug reports welcome.

--
Attached Files
File Type: zip ActiveOF2OPML-007b.scptd.zip (15.7 KB, 1820 views)
File Type: zip ActiveOF2OPML-011.scptd.zip (24.1 KB, 1939 views)

Last edited by RobTrew; 2012-10-09 at 11:08 PM.. Reason: ver 0.011 translates message:%3C to message://%3C
 
PS Any links in your OmniFocus notes to DevonThink records, should also work after OPML export to iThoughtsHD (if you have the corresponding records in DevonThink to Go on your iPad) regardless of the link export setting in the script.
 
And finally, one could tame it visually, bringing the branches in pre-folded to the preferred level, and with a preferred colour-scheme, by exporting from OmniFocus straight to the native iThoughts file format.

Perfectly feasible, and it's possible that Craig Scott, the iThoughts developer, may do that at some point – OmniFocus import is apparently somewhere there in his list of things to look at.

(In the meanwhile, I may do an interim sketch of it if I get some time in the next few weeks).
 
Thanks Rob, worked really well for me. Two requests:

- Would it be possible to save the OPML file automatically without open/save dialog? This way, I should be able to automate the process to run every x minutes without seeing the dialog.

- Any way to detect whether a task is recurring, and offer an option to see the recurring information (ex: every 2 weeks) as a note?

Thanks again.
 
Quote:
Originally Posted by viticci View Post
- Would it be possible to save the OPML file automatically without open/save dialog? This way, I should be able to automate the process to run every x minutes without seeing the dialog.
Various ways of doing that. If you are happy with the command line and simple shell scripts, you could fish the Python file out of the resources folder in the .scptd bundle, make a copy in your home directory, bypass Applescript altogether and use a command line like:

Code:
python "$HOME/ofoc_sqlite_to_opml_005.py" "$HOME/Dropbox/CurrentTasks.opml" 1
(Or a final zero in lieu of 1 to suppress export of links).

Quote:
Originally Posted by viticci View Post
- Any way to detect whether a task is recurring, and offer an option to see the recurring information (ex: every 2 weeks) as a note?
Various requests are coming in for additional/alternative selections of data, I'll review them all and think about the options in a week or two.

--

Last edited by RobTrew; 2012-09-10 at 09:11 AM..
 
Quote:
Originally Posted by RobTrew View Post
Various ways of doing that. If you are happy with the command line and simple shell scripts, you could fish the Python file out of the resources folder in the .scptd bundle, make a copy in your home directory, bypass Applescript altogether and use a command line like:

Code:
python "$HOME/ofoc_sqlite_to_opml_005.py" "$HOME/Dropbox/CurrentTasks.opml" 1
(Or a final zero in lieu of 1 to suppress export of links).



Various requests are coming in for additional/alternative selections of data, I'll review them all and think about the options in a week or two.

--
Fantastic, thank you.
 
-- ver 0.007 (above) restores the extraction of URLS from behind RTF links in OmniFocus notes

Thus notes stamped by my DevonThink/OmniFocus integration script, for example, will contain actual links to DevonThink records (or DevonThink to Go records on the iPad).

Something like:

Code:
x-devonthink-item://D43AA941-020B-4BFD-A362-45B34A4D4713 [Devonthink oo3 notes]
Rather than just the plain text label of the link:

Code:
[Devonthink oo3 notes]
 
I just want to commend this script to the group.

I just used it to create an excellent breakdown of where I am at with my various projects, for easy reporting to my manager.

Sure, it took a bit of fiddling to adjust the level expansion/contraction and jazz it up with some nice colours, but the end result was great.

If this OmniFocus/iThoughtsHD linkage could be enhanced within the programs themselves, this would be even better, but for now, this script is great.
 
As usual, a fantastic script from RobTrew! Thanks!!

How hard would it be to leave the tasks out of the OPML file so that it just shows the hierarchy of projects, folders etc.?

If I were to use this script for review purposes I wouldn't really be interested in seeing the actual tasks. Besides, I have so many tasks that folding the nodes takes a long time in a MindNode Pro mindmap.
 
Quote:
Originally Posted by mpw View Post
How hard would it be to leave the tasks out of the OPML file so that it just shows the hierarchy of projects, folders etc.?
The fall is bringing, from various quarters, a rich harvest of requests for all kinds of variant data sets :-)

I'll need to take a look at parsing and applying additional/alternative SQL clauses so that that people can fine-tune for themselves. (On 'how hard', well, easy enough if you just want flat lists, but I'll need to give a little thought to the best way of doing it while preserving the branching hierarchy that one needs for visualisation).
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Request: Faster Task Entry poritsky OmniFocus 2 for Mac (Private Test) 6 2013-04-24 12:02 AM
Batch Export OO to OPML or Text adgirard OmniOutliner 3 for Mac 0 2012-10-04 11:53 AM
Numbered rows in OPML export (perhaps via Applescript?) mjknight OmniOutliner 3 for Mac 0 2011-12-16 07:15 AM
Export to OPML with notes ben_worthington OmniOutliner 3 for Mac 1 2009-01-02 01:06 PM
OPML export doesn't include Topic? corris OmniOutliner 3 for Mac 0 2008-01-29 07:37 AM


All times are GMT -8. The time now is 03:24 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.