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-18 09:37 PM

[QUOTE=BrainInside;116295]@kingsinger
I think I get the idea, but I was thinking it is for OmniFocus forecast option on MacOS like it is on iPhone.

If you will be able to get a screen shot I would appreciate. Maybe I'm getting it wrong, however I think it will have no use for me.

Thanks[/QUOTE]

It isn't really like Forecast view on the iPhone. It's just a way of getting a layout on your desktop that contains similar information to the information contained in the forecast view on the iPhone.

It's not an interactive list. It's simply a text list of items starting in the next x days (or due in the next x days). When you make a change in Omnifocus, the next time the script is refreshed, these changes will be reflected on your desktop.

So if you don't keep OF open on your mac all the time, but you'd like to be able to see your task list at a glance by looking at your desktop, these scripts might be worth you while. But if what you really want is something pretty close to the iPhone functionality, this probably isn't what you want.

holyjaw 2012-10-21 07:54 AM

The "Calendared in the next seven days (by day of week, from iCal)" script appears to assume 10.8 Mountain Lion uses the same sqlite3 table schema as Lion. Apparently it doesn't.
[CODE]sqlite3 ~/Library/Calendars/Calendar\ Cache
.tables
.scheme ZICSELEMENT[/CODE] reveals 10.8 has moved rolled back to using 'zlocation'... or at least that's how my Calendar database is after moving from 10.6 > MobileMe > iCloud > 10.8

I've modified the script a bit to add in a check for sw_vers 10.8. It assumes 10.8 and later will retain 'zlocation' as opposed to 'zlocation1'

From line 11:
[CODE]if [ $OSXVER -eq 7 ]; then
CALTABLE=zicselement
REMCODE=24
LOCN=zlocation1
elif [ $OSXVER -ge 8 ]; then
CALTABLE=zicselement
REMCODE=24
LOCN=zlocation
else
CALTABLE=zcalendaritem
REMCODE=9
LOCN=zlocation
fi[/CODE]

RobTrew 2012-10-21 08:56 AM

Thanks – that's very helpful – I haven't seen a 10.8 system yet.

Amended above.

naupaka 2012-10-21 11:38 AM

To exclude projects from the startdate script, change lines 18-20:

[CODE]
MATCHES="($STARTS < ($NOW + (7 * $DAY))) and ($STARTS >= $TODAY)"
#TOTAL=$($OFQUERY "SELECT count(*) FROM task t WHERE $MATCHES")
[/CODE]

to:

[CODE]
MATCHES="($STARTS < ($NOW + (7 * $DAY))) and ($STARTS >= $TODAY)"
#TOTAL=$($OFQUERY "SELECT count(*) FROM task t WHERE $MATCHES")
EXCLUSIONS="AND p.name NOT IN ('Daily Review', 'Weekly Review')"
[/CODE]

and line 34:

[CODE]
left join folder f on t.folder=f.persistentIdentifier
WHERE status='active' and $MATCHES
ORDER BY t.effectiveDateToStart, f.name, p.name, c.name
[/CODE]

to

[CODE]
left join folder f on t.folder=f.persistentIdentifier
WHERE status='active' and $MATCHES $EXCLUSIONS
ORDER BY t.effectiveDateToStart, f.name, p.name, c.name
[/CODE]

[QUOTE=dbyler;115743]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[/QUOTE]

danielcompton 2012-10-29 10:40 PM

Calendar including past items
 
In v 0.15 of the calendar there is a bug where it shows past calendar items. At 19:34, 30/10/12 New Zealand time, it shows calendar items back as far as 11:00 on 29/10/12. It will not show items starting at 10:59 or before.

This is related to the timezone, when I set my computer time to GMT then the calendar shows events starting at midnight last night (as expected).

I am running OS X 10.7, is my time zone not being picked up and adjusted for in the script?

RobTrew 2012-10-30 03:00 AM

[QUOTE=danielcompton;116769]I am running OS X 10.7, is my time zone not being picked up and adjusted for in the script?[/QUOTE]

Thanks for picking this up – I wonder if there is a daylight savings subtlety at work.

If you enter this in Terminal.app on your system, do you get a correct local time adjustment ?

[CODE]date +%z | awk '{if (substr($1,1,1)!="+") {printf "+"} else {printf "-"} print substr($1,2,4)}'[/CODE]

or perhaps more to the point, what does this return, and does it look right ?
[CODE]date +%z[/CODE]

danielcompton 2012-10-30 06:05 PM

[QUOTE=RobTrew;116779]
[CODE]date +%z | awk '{if (substr($1,1,1)!="+") {printf "+"} else {printf "-"} print substr($1,2,4)}'[/CODE]
[/QUOTE]

[CODE]-1300[/CODE]

[QUOTE]
or perhaps more to the point, what does this return, and does it look right ?
[CODE]date +%z[/CODE][/QUOTE]

[CODE]+1300[/CODE]

NZ daylight savings time is 13 hours ahead of GMT. I'm not sure which of the two is correct but they aren't matching up. What do you think?

BrainInside 2012-10-30 06:12 PM

can anybody make a screenshot of that? I totally don't understand what you guys write here... not everybody is so smart to be a programmer ;-)

RobTrew 2012-10-31 12:29 AM

[QUOTE=danielcompton;116813][CODE]-1300[/CODE]

[CODE]+1300[/CODE]

NZ daylight savings time is 13 hours ahead of GMT. I'm not sure which of the two is correct but they aren't matching up. What do you think?[/QUOTE]

They are technically both working - the former derives a zone reset by a simple sign-inversion (so that 13 hours are deducted from the GMT value).

In your 10.59 11.00 example, are we looking at late morning, or at 22.59 and 23:00 by 24h reckoning ?

danielcompton 2012-10-31 03:08 PM

It was late morning, e.g. 13 hours before midnight.

The full terminal output is below.

[CODE]
$date +%z | awk '{if (substr($1,1,1)!="+") {printf "+"} else {printf "-"} print substr($1,2,4)}'
-1300
$date +%z
+1300
[/CODE]


All times are GMT -8. The time now is 04:46 AM.

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