Using Omnifocus2 and Geektool

I am currently having trouble integrating my new omnifocus 2 set up and my pre-existing Geektool widgets. The main problem is not being able to find the database. Does anyone have any tips?

What do you mean by ā€œnot being able to find the databaseā€? Is there a specific error message youā€™re seeing? (Bonus points for a screenshot.)

1 Like

I also have a GeekTool OF setup. The script is looking for the database at:

~/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Caches/com.omnigroup.OmniFocus2/OmniFocusDatabase2

ā€¦ and works perfect.

Hereā€™s the script I am using ā€“ I got it from one of the other geektool links. Basically, I couldnā€™t find the path to my data.

#!/bin/sh
#OFOC=$(osascript -e ā€˜tell application ā€œFinderā€ to get id of application file id ā€œOFOCā€ā€™)
OFOC=ā€œcom.omnigroup.OmniFocusā€ # For Appstore-purchased variant use (slower) line above instead
echo ā€œTASKS:ā€
sqlite3 $HOME/Library/Caches/$OFOC/OmniFocusDatabase2 ā€™
SELECT p.name, c.name, tt.name
FROM ((task t left join projectinfo pi on t.containingprojectinfo=pi.pk) tt
left join task p on tt.task=p.persistentIdentifier)
left join context c on tt.context = c.persistentIdentifier
WHERE tt.dateCompleted is null
ORDER BY p.name, c.nameā€™ | awk ā€™
BEGIN {FS="|"; prj=0; ctx=0;}
{
# Whenever the value of col. 1 changes,
# write it out as a PROJECT header,
if (prj!=$1) {prj=$1; if (length(prj) < 1) {print ā€œ\n(INBOX)ā€}
else {print ā€œ\nā€ toupper(prj)}};

 # and whenever the value of col. 2 changes,
 # write it out as a [CONTEXT] sub-header.
 if (ctx!=$2) {ctx=$2; if (length(ctx) > 0) {print "[" ctx "]"}};
     
 # Whenever col 3. contains sth other than the project name,
 # write it out as a ā€¢ TASK.
 if (length($3) > 0 && $3!=$1) {print "ā€¢ " $3}

}ā€™

Now, when I try using this, I get the old database, the way that it looked when I used Omnifocus one. No updates since about last night. So, it seems to me that this info is saving to a different directory that i canā€™t actually find.

Ok ā€“ cleaned out every other file ever and used you hack, and it worked! Thanks a billion!

Yes, OmniFocus 2 stores its database in a different location than OmniFocus 1, so you need that ā€œhackā€ to look at the right database.

1 Like

Piece of cake now.

Hi,

Iā€™m new using the shell, is there a way just to get the script to display only whats in the inbox?

Thanks