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

 
Read perspective information from cache DB Thread Tools Search this Thread Display Modes
My Alfred 2 OF workflow is almost completely based on the OF cache database. This has the advantage that OmniFocus does not have to be running. The only case that requires me to open OF is when I want to show the tasks of a perspective.

I tried to get the perspective settings from the database to be able to re-create the query. At the moment I am stuck on how to handle the plist data read from DB. I tried to read the data with sqlite3 on the command line and write the result to a file. But PListBuddy or any other property list tool I tried always complains that the file is no plist file. But the magic number "bplist" indicates that it should be a binary property list.

Does someone has a hint what I am doing wrong?
 
I haven't tested this, but my first guess would be that you may need to do a type conversion of the blob data with a CAST expression.

Perhaps something like:

Code:
select CAST(valueData as text) FROM Perspective ...
 
Thanks for your help. Unfortunately, the cast() did not work. There are not so many useful search results on Google on that topic. Seems that not so many people try to handle blob data from the cli. In the end, I found a solution that works:

Code:
sqlite3 ~/Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2 "SELECT QUOTE(valueData) FROM Perspective ..." | sed -e "s/^X'//" -e "s/'$//" | xxd -r -p > test.plist
 
Quote:
Originally Posted by markokaestner View Post
In the end, I found a solution that works:

Code:
sqlite3 ~/Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2 "SELECT QUOTE(valueData) FROM Perspective ..." | sed -e "s/^X'//" -e "s/'$//" | xxd -r -p > test.plist
Useful. Thanks !
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
saving to omnifocus cache connie OmniFocus 1 for Mac 3 2009-11-15 03:02 PM
app blocks during cache cleanup leeharveyosmond OmniWeb Bug Reports 0 2007-04-13 11:43 AM
Acccess to the cache? zottel OmniWeb General 6 2006-10-26 03:08 PM
Please cache php pages tombeck OmniWeb General 6 2006-08-04 01:36 AM
cache issues Forrest OmniWeb Bug Reports 0 2006-05-19 12:26 PM


All times are GMT -8. The time now is 07:15 PM.


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