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

 
Script: Filtered export to iThoughtsHD & OPML (& .txt) Thread Tools Search this Thread Display Modes
Hi all.

Rob, thanks for a very useful script.

For some reason, the standalone python version throws a fit when I run it. It tells me that "today" is not defined (line 120)

I've managed to work around by using "time" instead:

str_file = time.strftime('%Y-%h-%d-%Hh%Mm%Ss')

but it seems like a strange error. Its probably my install of python which is wonky.
Anybody faced the same problem?

Cheers
 
Thanks for the report – I haven't see that here. (I'll try to take a look and give it some thought at the weekend).

What, broadly, is your OS X version and Python history ?
 
Rob, thanks a lot for a great script indeed!
Could you, guys share your workflow on a mac, how do you use this brilliant opportunity to represent your entire life as a map?
I've just exported my OF base to MindNode for the 1st time - looks awesome. Although I'd like to have images representing my main areas of life and I wonder, is there any solution to get them in my mindmap with every export? Maybe to assign them in OF somehow?
And are due dates and other stuff from OF available in iThoughts only? As I've got not iPad, I'd like to find the best solution for Mac. I've also tried Mythoughts, but didnt find due dates there, though notes are there, and another moment is that all branches are of the same color..

Last edited by splitloop; 2013-01-15 at 04:03 AM..
 
Sorry, I should've thought to include this.

OS X 10.8.2
Python is basic OS X Python that comes with Mountain Lion
Well, that's not entirely true. I installed Virtual Environments on my MBAir to get the latest Python releases, but I wasn't using them. When the problem appeared, I deactivated them but the problem kept reappearing. However, I haven't kept track of which packages are available where.

As for my own history with python ... let's say I'm dipping my toes in the shallow end of the pool ;-)

Testing this on another machine - will let you know.

Last edited by Paul_A; 2013-01-15 at 05:28 AM..
 
@splitloop
You can use MindNode (IIRC there is a free version, web is http://mindnode.com) on the OPML version of the file.
And yes, due dates seem to disappear.
 
yeah, thats what I'm using. So is there a program for Mac where start and due dates would work?
Does anyone here use mac for mindmapping from OF?
 
Quote:
Originally Posted by Paul_A View Post
Sorry, I should've thought to include this.

OS X 10.8.2
Python is basic OS X Python that comes with Mountain Lion
Well, that's not entirely true. I installed Virtual Environments on my MBAir to get the latest Python releases, but I wasn't using them. When the problem appeared, I deactivated them but the problem kept reappearing. However, I haven't kept track of which packages are available where.

As for my own history with python ... let's say I'm dipping my toes in the shallow end of the pool ;-)

Testing this on another machine - will let you know.
OK, so other machine exhibits same issue.
If I run the script (with FastScript) everything is smooth.
When I run the embedded python, i get the error.

Pauls-iMac:~ paul$ python ofoc_to_mindmap_022.py --format=itmz --output=$HOME/maps/ -c '0'
Traceback (most recent call last):
File "ofoc_to_mindmap_022.py", line 945, in <module>
main()
File "ofoc_to_mindmap_022.py", line 120, in main
str_file = today.strftime('%Y-%h-%d-%Hh%Mm%Ss')
NameError: global name 'today' is not defined

If I replace with time.strftime ... then it works as advertised ...
 
Quote:
Originally Posted by Paul_A View Post
OK, so other machine exhibits same issue.
If I run the script (with FastScript) everything is smooth.
When I run the embedded python, i get the error.
What is the full command line that you are using ? Might that be the source of the string 'today' ?

(The AS script also just calls the Python script with a set of arguments - if you trace the script you can see exactly what command line it assembles).
 
Sorry to take so long to reply. Extended week-end AFK.

So here's the scary thing: it now works. The only thing I can think of that changed is that I restarted the Mac.
Sorry for sending you on a wild goose chase, and thanks for helping out.

One question for future reference: how do I trace a script?

Cheers
 
Good, I'm glad its working.

You should be able to see the command line that is being assembled by the Applescript by looking at the Event Log in Applescript Editor, or inserting a
Code:
display dialog
to show the value of the string.

(Script Debugger is, of course, excellent).
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
ofexport - export to text, taskpaper, html, opml psidnell OmniFocus Extras 110 2014-04-01 08:36 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 02:21 AM.


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