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
Any reason why this:

Quote:
property psqlProjectFilter : "childrenCount > 0, taskBlockedByFutureStartDate=0, folderEffectiveActive = 1, status = active, dateCompleted is null"
kills the tasks with future dates, but doesn't kill the projects with no tasks?
 
Well caught - yes there is :-)

In lieu of:
Code:
childrenCount > 0
try:
Code:
numberOfRemainingTasks > 0
(the problem with childrenCount 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.

--
 
Added a couple of export formats to Ver 021 in the first post.
  1. MD for simple Markdown
  2. FT to enhance the basic MD with tags for FoldingText's todo mode, which gives checkboxes to tasks, and provides strike-through for any done items.

Note: you can include done items in your export by adjusting the task (and project) filters to remove the dateCompleted is null condition.

--
 
MacStories has a good article on using this script (through Hazel) to keep an iThoughtsHD mind map automatically updated with changes in your OmniFocus data.
 
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
 
What do you see in the Terminal if you enter:
Code:
sqlite3 -version ; Python -V
?

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

Code:
3.6.12
Python 2.6.1
 
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
Don't know if that's helpful at all.

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

--

Last edited by RobTrew; 2012-10-10 at 02:29 AM..
 
Thanks. No imminent plans to upgrade, so I guess I'll just have do without for now.
 
 


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 03:33 PM.


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