The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   ofexport - export to text, taskpaper, html, opml (http://forums.omnigroup.com/showthread.php?t=29081)

psidnell 2013-04-12 12:00 AM

ofexport - export to text, taskpaper, html, opml
 
This is a command line tool that directly reads your OmniFocus database and writes text files in a variety of formats.

Instructions [URL="https://github.com/psidnell/ofexport/blob/master/DOCUMENTATION.md"]here[/URL].

Let me know if you have any trouble or ideas.

nickwild 2013-04-13 04:03 AM

Hi,

When I edit the script in Xcode I get command not available. ANy ideas what the problem might be?
Thanks
Nick

psidnell 2013-04-13 05:10 AM

[QUOTE=nickwild;122466]Hi,

When I edit the script in Xcode I get command not available. ANy ideas what the problem might be?
Thanks
Nick[/QUOTE]

I'd hazard a guess that you might have missed a step of the installation instructions [URL="https://github.com/psidnell/ofexport/blob/master/DOCUMENTATION.md#downloadinstallation"]here[/URL] or perhaps got the path wrong.

Have you:

1. Modified ofexport so the path to ofexport.py is correct?
2. Set execute permission on ofexport ("chmod +x ofexport")?
3. Modified your $PATH variable so your installation folder is on your path?

If you're running terminal and in your installation directory, type "bash ofexport" on the command line. If it prints out it's options then (1) is OK.

If you type "./ofexport" and it prints it's options then (2) is OK.

Otherwise I'd suspect (3).

psidnell 2013-04-30 12:41 AM

Just made V2.0.0 available.

This version has fancy expression filters e.g:

[CODE]ofexport -E -a done=any -I -t "flagged or (due='to tomorrow')" -o /tmp/ex8-due-or-flagged.taskpaper [/CODE]

creates a taskpaper document with all uncompleted tasks that are flagged or due in the next 2 days.

Usage examples [URL="https://github.com/psidnell/ofexport/blob/master/documentation/examples.md"]here[/URL].

Full documentation [URL="https://github.com/psidnell/ofexport/blob/master/DOCUMENTATION.md"]here[/URL].

I've been using this version for about a week so most of the screamingly obvious bugs are gone but the expression parsing is pretty new so bear that in mind...

kingsinger 2013-05-09 12:37 AM

Is it possible to filter by a perspective?

I have one called current focus that is the 5-10 projects I'm focusing on right now. I find it helpful view that perspective in context view ungrouped, sorted by due date, with availability set to next action, as it tends to give me a list of the 5-10 actions I need to be focusing on.

It would be great if I could put that on my desktop with geektool and hazel.

psidnell 2013-05-09 10:39 AM

[QUOTE=kingsinger;123855]Is it possible to filter by a perspective?[/QUOTE]

Not yet - that would be nice though!

The nearest you can get is to use the filtering to include/exclude the same (or a similar set) of tasks that you see in your perspective.

Something like:

[CODE]ofexport -p 'text="Proj1|Proj2"' -E -a done=any --open -o ~/Desktop/x.taskpaper[/CODE]

Would do the trick, but you'd have to keep it up to date with what projects are current. I have a bunch of little fragments like this that I put in dedicated bash scripts.

Alternatively, a lower maintenance scheme is to "tag" the projects you want to appear in your report by adding something to the notes in your current projects in OmniFocus.

For example by adding "#current" to the notes of a few of your projects you could then use:

[CODE]ofexport -p 'note="#current"' -E -a done=any --open -o ~/Desktop/x.taskpaper[/CODE]

I use this trick for exporting certain items to my calendar.

The problem with ofexport directly using perspectives is that I think the each perspective is stored as a rule that has to be executed in order to derive what's visible in it - and there are several aspects of the visibility of items in the omnifocus database that I've yet to understand (such as if a project/context is paused, or what the next action is). Until I've decoded those I can't really replicate a perspective faithfully.

Detecting the paused/on-hold status is next on my list of things to decipher.

kingsinger 2013-05-09 11:51 AM

Great. That all makes sense. Right now, I'm just trying to get ofexport to run on my machine. I think I installed it correctly (put it in my home directory, etc.). I'm running 10.6.8. Don' t know if that's an issue.

When I issue the "ofexport -?" command in the terminal, this is what I get back:


[CODE]Traceback (most recent call last):
File "/Users/Redacted/ofexport/src/main/python/ofexport.py", line 25, in <module>
from of_to_tp import PrintTaskpaperVisitor
File "/Users/Redacted/ofexport/src/main/python/of_to_tp.py", line 17, in <module>
from fmt_template import Formatter
File "/Users/Redacted/ofexport/src/main/python/fmt_template.py", line 40
self.nodes = {k:Template(v) for (k,v) in data['Nodes'].items()}
^
SyntaxError: invalid syntax[/CODE]

I get something the same message when I run "ofexport -o report.txt".

psidnell 2013-05-09 12:59 PM

[QUOTE=kingsinger;123885]I'm running 10.6.8. Don' t know if that's an issue[/QUOTE]

It probably is, or more specifically it might be your python version.

I'm running OSX 10.8.3 and if I run "python -V" I get 2.7.2.

It looks like your python interpreter is barfing on a "dictionary comprehension", a quick google showed up exactly your problem [URL="https://github.com/cortesi/mitmproxy/issues/90"]here[/URL]. I'd guess you have a pre 2.7 version of python.

Sorry about that, I'd better add some pre-requisites to the release notes :-(

I think it's possible to go fetch a newer version of python and install it without overwriting your system copy - but you're in uncharted waters there.

----

It looks like the first OSX version to get python >= 2.7 was Lion with 2.7.1.
So it definitely won't work for anything older than that without installing a newer python. Hopefully it does at least work on Lion!

Anyone tried it on Lion?

kingsinger 2013-05-09 09:31 PM

Yup, I've got 2.6.1.

Oh well.

JL

psidnell 2013-05-09 11:16 PM

[QUOTE=kingsinger;123900]Yup, I've got 2.6.1.

Oh well.

JL[/QUOTE]

I've added a [URL="https://github.com/psidnell/ofexport/blob/master/DOCUMENTATION.md#pre-requisites"]pre-requisites[/URL] section indicating that it won't work with the version of python that ships with Snow Leopard.

It can be upgraded: [url]http://www.python.org/download/releases/2.7.4/[/url] but I don't know what issues are associated with doing that.


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

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