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)

Mschechter 2012-10-01 07:48 AM

Any reason why this:

[QUOTE]property psqlProjectFilter : "childrenCount > 0, taskBlockedByFutureStartDate=0, folderEffectiveActive = 1, status = active, dateCompleted is null"[/QUOTE]

kills the tasks with future dates, but doesn't kill the projects with no tasks?

RobTrew 2012-10-01 08:01 AM

Well caught - yes there is :-)

In lieu of:
[CODE]childrenCount > 0[/CODE]

try:
[CODE]numberOfRemainingTasks > 0[/CODE]

(the problem with [I]childrenCount[/I] is that it includes, for a start, any completed tasks)

Thanks for my drawing attention to that, I'll update the comments in the script file.

[COLOR="White"]--[/COLOR]

RobTrew 2012-10-02 07:55 AM

Added a couple of export formats to Ver 021 in the [URL="http://forums.omnigroup.com/showpost.php?p=115352&postcount=1"]first post[/URL].
[LIST=1][*]MD for simple Markdown[*]FT to enhance the basic MD with tags for [URL="http://www.foldingtext.com"]FoldingText[/URL]'s [URL="http://mac.appstorm.net/reviews/productivity-review/foldingtext-a-swiss-army-knife-for-plain-text-lovers/"]todo mode[/URL], which gives checkboxes to tasks, and provides strike-through for any done items.[/LIST]
Note: you can include done items in your export by adjusting the task (and project) filters to remove the [I]dateCompleted is null[/I] condition.

[COLOR="White"]--[/COLOR]

RobTrew 2012-10-04 04:10 AM

MacStories has [URL="http://www.macstories.net/tutorials/visualize-omnifocus-as-ithoughts-map-opml-or-plain-text/"]a good article[/URL] on using this script (through Hazel) to keep an iThoughtsHD mind map automatically updated with changes in your OmniFocus data.

kingsinger 2012-10-09 10:24 AM

Anyone else getting an error when they run the applescript version? Happens both when I run it on a specific folder and when I run it on all filterd data. I'm running Snow Leopard 10.6.8. Here is the error I'm getting. Wondering if maybe my database is corrupted or something.

EDIT: Also I was trying to export as OPML

[CODE]error "SystemUIServer got an error: Traceback (most recent call last):
File \"/Users/REDACTED/Library/Scripts/Applications/Omnifocus/OF2MindMap-022/OF2MindMap-022.scptd/Contents/Resources/ofoc_to_mindmap_022.py\", line 945, in <module>
main()
File \"/Users/REDACTED/Library/Scripts/Applications/Omnifocus/OF2MindMap-022/OF2MindMap-022.scptd/Contents/Resources/ofoc_to_mindmap_022.py\", line 104, in main
lst_tree = build_tree(options.root)
File \"/Users/REDACTED/Library/Scripts/Applications/Omnifocus/OF2MindMap-022/OF2MindMap-022.scptd/Contents/Resources/ofoc_to_mindmap_022.py\", line 270, in build_tree
(var_root_parent, flat_of) = get_flat_omnifocus(var_root)
File \"/Users/REDACTED/Library/Scripts/Applications/Omnifocus/OF2MindMap-022/OF2MindMap-022.scptd/Contents/Resources/ofoc_to_mindmap_022.py\", line 783, in get_flat_omnifocus
WHERE (containsSingletonActions = 1) and ', str_clauses]), tpl)
sqlite3.OperationalError: near \"?\": syntax error" number 1[/CODE]

RobTrew 2012-10-09 10:47 AM

What do you see in the Terminal if you enter:
[CODE]sqlite3 -version ; Python -V[/CODE]
?

( I wonder if there is syntax issue with earlier versions - I haven't tested on OS X 10.6 )

kingsinger 2012-10-09 05:02 PM

I see this:

[CODE]3.6.12
Python 2.6.1
[/CODE]

kingsinger 2012-10-09 10:39 PM

FWIW, when I run the ActiveOF2OPML-011 script, I get this error message (looks like pretty much the same one):

[CODE]error "Traceback (most recent call last):
File \"/Users/Redacted/Downloads/ActiveOF2OPML-011.scptd/Contents/Resources/ofoc_sqlite_to_opml_011.py\", line 253, in <module>
main()
File \"/Users/Redacted/Downloads/ActiveOF2OPML-011.scptd/Contents/Resources/ofoc_sqlite_to_opml_011.py\", line 66, in main
flat_of = get_flat_omnifocus()
File \"/Users/Redacted/Downloads/ActiveOF2OPML-011.scptd/Contents/Resources/ofoc_sqlite_to_opml_011.py\", line 155, in get_flat_omnifocus
and p.folderEffectiveActive = ? and tpl.dateCompleted is ?', tpl)
sqlite3.OperationalError: near \"?\": syntax error" number 1[/CODE]

Don't know if that's helpful at all.

KS

RobTrew 2012-10-09 11:02 PM

OK, something to do with the OS version, I think. I've reproduced the problem on another system running 10.6

I think you'll find that the problems vanish if and when you upgrade your version of OS X. In the meanwhile, thank you for drawing this to my attention, and I'll add a note about the script requiring OS X 10.7 and above.

(I won't advise you to upgrade your Python installation to 2.7, because while it is possible to have two versions of Python installed concurrently, you have to be careful not to replace the version which OS X is using, in case there are any script dependencies in OS X processes. I am also not sure that it is the Python version that is the issue).

[COLOR="White"]--[/COLOR]

kingsinger 2012-10-10 02:56 PM

Thanks. No imminent plans to upgrade, so I guess I'll just have do without for now.


All times are GMT -8. The time now is 03:51 PM.

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