The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Forecast view listings for Mac desktop (http://forums.omnigroup.com/showthread.php?t=25238)

kingsinger 2012-10-07 11:51 AM

[QUOTE=RobTrew;115573]To many of mine are showing as imminently overdue so I'll have to leave that as an exercise for the reader, for the moment :-)

For the display of years with [I]strftime[/I]:
[URL="http://www.sqlite.org/lang_datefunc.html"]http://www.sqlite.org/lang_datefunc.html[/URL]

To eliminate uncompleted tasks of completed projects, I think you could begin by trying to expand [I]t.dateCompleted is null[/I] in MATCHES to something like [I] p.status = 'active' and t.dateCompleted is null[/I][/QUOTE]

FWIW, I don't think the calendar script is pulling in repeated events from iCal. This is true both of a native iCal calendar I have and also a CalDav google calendar I'm subscribed to.

Beyond that, thanks for your feedback/suggestions. Sadly, most of this sqlite scripting stuff is beyond me. I tried changing that Matches= statement as you suggested and then adjusting the parenthesis as that seemed necessary too. But when I did this, no tasks showed anymore. So either more is needed, or more likely, I did something wrong.

RobTrew 2012-10-07 03:06 PM

I've made a couple of quick edits to the 'coming week' view above to include years and insert a [I]status='active'[/I] clause.

Haven't taken a look at how repeating tasks are handled in the iCal database. Unlikely to get to that this week.

kingsinger 2012-10-07 11:40 PM

[QUOTE=RobTrew;115693]I've made a couple of quick edits to the 'coming week' view above to include years and insert a [I]status='active'[/I] clause.

Haven't taken a look at how repeating tasks are handled in the iCal database. Unlikely to get to that this week.[/QUOTE]

Thanks Robtrew! That seems to have worked.

dbyler 2012-10-08 12:49 PM

Rob,

This is awesome! For those interested in excluding certain projects from the output... just change

[CODE]
read overTOTAL weekTOTAL foreTOTAL <<< $($OFQUERY "
SELECT count(*) FROM $JOIN WHERE $OVERMATCHES;
SELECT count(*) FROM $JOIN WHERE $MATCHES;
SELECT count(*) FROM $JOIN WHERE $NEXTMATCHES;
")
[/CODE]

to

[CODE]
EXCLUSIONS="AND p.name NOT IN ('Work Recurring', 'Daily')"
read overTOTAL weekTOTAL foreTOTAL <<< $($OFQUERY "
SELECT count(*) FROM $JOIN WHERE $OVERMATCHES $EXCLUSIONS;
SELECT count(*) FROM $JOIN WHERE $MATCHES $EXCLUSIONS;
SELECT count(*) FROM $JOIN WHERE $NEXTMATCHES $EXCLUSIONS;
")
[/CODE]

In this example I've excluded tasks from the "Work Recurring" and "Daily" projects.

Note: this only works for the DUE script. I'm tinkering with the START script but it's not just a copy-paste operation.

/d

kingsinger 2012-10-09 05:04 PM

If I wanted to see the same info from the Due Script in a text file instead in a geektool gadget thing, what would I need to do?

RobTrew 2012-10-09 11:24 PM

[QUOTE=kingsinger;115792]If I wanted to see the same info from the Due Script in a text file instead in a geektool gadget thing, what would I need to do?[/QUOTE]

You can run it as a shell script. Googling [I]"OS X" run shell script[/I] will take you to various options but a traditional approach might be to save the script as a text file with the extension .sh and then make it executable with the [I]chmod[/I] command in Terminal.app

If you save it in your user directory as [I]ofdue.sh[/I] you could make it executable and test it with sth like:[LIST][*]chmod u+x ofdue.sh[*]$HOME/ofdue.sh[/LIST]
Then, to generate and inspect a text file containing the output:[LIST][*]$HOME/ofdue.sh > results.txt[*]cat results.txt[/LIST]

RobTrew 2012-10-09 11:35 PM

1 Attachment(s)
If you want an automatically updated text file (for example whenever the SQLite cache changes), it might be worth experimenting with Hazel.

[COLOR="White"]--[/COLOR]
[IMG]http://forums.omnigroup.com/attachment.php?attachmentid=2588&stc=1&d=1349858466[/IMG]

kingsinger 2012-10-10 03:00 PM

I've got Hazel on my system, so that sounds like an excellent approach to try.

Thanks!

kingsinger 2012-10-10 03:04 PM

One other thing to note about the Due Script. All seems to work as anticipated now, except for one thing:

Periodically in the list of tasks I get a line item that reads "Was due Sun Jan"

It has no date and year and no description of the task.

Wondering if this reflects some sort of corruption in my database, or something odd with the script?

KS

kingsinger 2012-10-10 08:13 PM

Got the Hazel rule to work. Nice. Now the text file sits in NV Alt, so it gets sync to Simplenote and with luck I can see it from Android phone and elsewhere.


All times are GMT -8. The time now is 04:38 PM.

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