The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Script: Filtered export to iThoughtsHD & OPML (& .txt) (http://forums.omnigroup.com/showthread.php?t=25965)

Paul_A 2013-01-14 09:55 PM

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

RobTrew 2013-01-15 02:55 AM

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 ?

splitloop 2013-01-15 03:44 AM

Your workflow on mac
 
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..

Paul_A 2013-01-15 05:07 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.

Paul_A 2013-01-15 05:11 AM

@splitloop
You can use MindNode (IIRC there is a free version, web is [url]http://mindnode.com[/url]) on the OPML version of the file.
And yes, due dates seem to disappear.

splitloop 2013-01-15 05:33 AM

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?

Paul_A 2013-01-15 05:53 AM

[QUOTE=Paul_A;119282]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.[/QUOTE]

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 ...

RobTrew 2013-01-16 12:36 AM

[QUOTE=Paul_A;119285]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. [/QUOTE]

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).

Paul_A 2013-01-21 05:10 PM

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

RobTrew 2013-01-22 12:29 AM

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[/CODE] to show the value of the string.

([URL="http://www.latenightsw.com"]Script Debugger[/URL] is, of course, excellent).


All times are GMT -8. The time now is 01:43 PM.

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