The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   ofexport - export to text, taskpaper, html, opml (http://forums.omnigroup.com/showthread.php?t=29081)

kingsinger 2013-05-17 09:12 AM

Thanks for your thoughts. Yes, you're right. The whole point of "ungrouped" in OF is that there isn't a sort/grouping at the context level. So the only sort that gets applies is to whatever tasks are in view.

FWIW, when I do -c "sort date", here's what I get:

[QUOTE]- @due(2013-04-29) @context(Office)
- @due(2013-04-16) @context(Computer-Offline)
- @due(2013-05-01) @context(Computer-Offline)
- @due(2013-05-13) @context(Computer-Offline)
- @context(Computer-Offline)
- @due(2013-05-17) @context(Computer-Offline)
- @due(2013-05-17) @context(Computer-Offline)
- @due(2013-05-17) @context(Computer-Offline)
- @due(2013-05-20) @context(Computer-Offline)
- @due(2013-05-21) @context(Computer-Offline)
- @due(2013-04-16) @context(Waiting For)
- @due(2013-04-26) @context(Waiting For)
- @context(Waiting For)
- @due(2013-05-02) @context(E-Mail Follow-Up)
- @due(2013-05-10) @context(E-Mail Follow-Up)
- @due(2013-05-18) @context(Computer-Online)[/QUOTE]

The dates are in the right order within the context, but I don't really understand why the contexts are in the order that they are in.

Anyway, the reason why I'm trying to make this work is that seems like it might be helpful to have relatively short list of the most high priority tasks on the desktop via Geektool, with a Hazel action updating it when the cache changes. I already do that with a different layout of tasks using one of RobTrew's scripts. But I'm starting to feel like it gives me too much info.

A short, flat task list seems like something that could be useful to more people than just me.

I've been using OF since it Kinkless GTD. But it's only relatively recently, when I started doing inbox zero in my e-mail, that I've come to fully appreciate the value of hiding things from view, so it's easier to focus on the few things that are left (which are presumably the things you've determined are most important right now.)

psidnell 2013-05-18 04:04 AM

[QUOTE=kingsinger;124220]A short, flat task list seems like something that could be useful to more people than just me.[/QUOTE]

OK - V2.1.5 is still to hot to hold without tongs, but I've made a change that relate to this.

There's a new filter [B]--tasks[/B] which puts all the unfiltered tasks into a single project/context (depending on mode) e.g:

[CODE]ofexport -o ~/x.taskpaper -C --tasks -E -t done=none -c "sort done" -T taskpaper-lite[/CODE]

[QUOTE=kingsinger;124220]The dates are in the right order within the context...[/QUOTE]

Secondly I've made the sort a bit less dumb - if you're sorting by dates and two dates are equal it ought to show them in the order that they were originally in within OmniFocus.

kingsinger 2013-05-19 02:22 PM

Nice. That's a definite improvement on the grouping. And the sort is much closer too. Here's what I get with the same query I posted above:

[QUOTE]- @due(2013-04-16) @context(Tasks)
- @due(2013-04-16) @context(Tasks)
- @due(2013-04-26) @context(Tasks)
- @due(2013-04-29) @context(Tasks)
- @due(2013-05-01) @context(Tasks)
- @due(2013-05-02) @context(Tasks)
- @due(2013-05-10) @context(Tasks)
- @due(2013-05-13) @context(Tasks)
- @due(2013-05-17) @context(Tasks)
- @due(2013-05-17) @context(Tasks)
- @due(2013-05-17) @context(Tasks)
- @due(2013-05-18) @context(Tasks)
- @context(Tasks)
- @context(Tasks)
- @due(2013-05-20) @context(Tasks)
- @due(2013-05-21) @context(Tasks)
[/QUOTE]

If only there was a way to put the items without a due date after all of the items with a due date, then it would be sorting in the same way that OF sorts in this kind of view (i.e., you see stuff with due dates first and then stuff without due dates after that--not sure how the items without a due date are ordered in OF, perhaps by project?)

Presumably the tasks without due dates sorted where they did, because they get today as the due date, yes? Would there be any way of using the day after the latest occurring due date in the found set as the due date for items with no due date? That would place them at the end of the list, wouldn't it?

psidnell 2013-05-19 11:44 PM

[QUOTE=kingsinger;124297]
If only there was a way to put the items without a due date after all of the items with a due date, then it would be sorting in the same way that OF sorts in this kind of view (i.e., you see stuff with due dates first and then stuff without due dates after that--not sure how the items without a due date are ordered in OF, perhaps by project?)

Presumably the tasks without due dates sorted where they did, because they get today as the due date, yes? Would there be any way of using the day after the latest occurring due date in the found set as the due date for items with no due date? That would place them at the end of the list, wouldn't it?[/QUOTE]

I think this should be a really easy fix. I assume a date in the distant past instead of today then if sorting by start/due then items with no date will naturally drop below items with a date.

psidnell 2013-05-20 12:27 AM

V2.1.6 will put undated items below dated ones when sorting by start or due - which is far more sensible.

kingsinger 2013-05-20 01:33 AM

That seems to work. Thanks!

How would I modify the flat template so that I could put certain info on a second line indented underneath the task. For example this:

-Task: [INDENT]Project[/INDENT]-Task[INDENT]Project[/INDENT]
I don't necessarily want a double space between the two lines. The bulletin board software put that in there.

Also, how would I make a shell script out of one of my queries that I could use to update a geek tool text file via Hazel whenever the OF cache is updated?

psidnell 2013-05-20 10:47 PM

[QUOTE=kingsinger;124314]That seems to work. Thanks!

How would I modify the flat template so that I could put certain info on a second line indented underneath the task. For example this:

-Task: [INDENT]Project[/INDENT]-Task[INDENT]Project[/INDENT]
I don't necessarily want a double space between the two lines. The bulletin board software put that in there.[/QUOTE]

You ought to be able to do something like this on the line for formatting tasks (and you'd probably want it for task groups too):

[CODE]"TaskStart": "- $name\n\t$project",[/CODE]

where:[LIST][*] \n = newline[*] \t = tab[/LIST]
I do something similar in the TaskPaper template to print the link to the OmniFocus task in a note on the next line.

psidnell 2013-05-20 11:17 PM

[QUOTE=kingsinger;124314]... how would I make a shell script out of one of my queries that I could use to update a geek tool text file via Hazel whenever the OF cache is updated?[/QUOTE]


For Hazel, your OF database will likely be in one of these two locations (depending on how you purchased it):
[LIST][*]Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2[*]Library/Caches/com.omnigroup.OmniFocus.MacAppStore/OmniFocusDatabase2[/LIST]
For the script side of things here's an example of one of mine:

[CODE]#!/bin/bash

FILE=~/Desktop/"REPORT-WORK-`date +"%Y-W%V-%h-%d"`.taskpaper"
ofexport \
-T taskpaper-lite \
-o "$FILE" \
-f 'text=^Work$|^Miscellaneous$' \
-E \
-p text=Routine \
-p text=Repeat \
-I \
"$@" \
-a flatten \
-a prune \
-E \
-t text='SEQ|PAR' \
-f sort
[/CODE]

I like breaking the command over multiple lines like this so I can see what's going on. Note that the "$@" is shell variable that inserts any additional command line arguments at that point - allowing you write scripts that use other scripts etc. This is my base "work" script, I have other scripts that use this and add filters for showing and sorting by just due or just done etc. I often run "work --open" to create and open the file, for example.

You'll need to run "chmod +x myscript" on your script ro make it executable (and then make sure it works!) because diagnosing problems when the happen in Hazel is a pain. You may need to refer to your script via it's full path - rather than just by name, I'm not sure where Hazel gets it's environment from.

Finally, the Hazel recipe for generation is something I'm still playing with. I don't want it to run too often (I have about 5 uses of ofexport triggered and it uses a lot of CPU). Also if ofexport is reading continuously, it can block OF from writing so to trigger and throttle I have:

- Full Name is <database>
- Date Last Modified in in the last 5 mins
- Date Last Modified is NOT in the last 4 mins
- Date Last Matched in NOT in the last 4 mins

I don't fully understand exactly how Hazel rules are interpreted but the abve seems to do what I want.

Embedded Script:

[CODE]. /Users/psidnell/.bashrc
/Users/psidnell/Workspace/Bin/hazel/of_modified[/CODE]

psidnell 2013-05-20 11:26 PM

... (out of time for updating the above post) ...

As for GeekTool I'm generating two text files when OmniFocus writes it's database that GeetTool blindly updates once every minute.

I tend to have "Todo" on the left in orange that's an export of everything flagged or due today. On the right I'll have things I've completed today in green.

kingsinger 2013-05-21 02:29 PM

Awesome. Thanks for your help!


All times are GMT -8. The time now is 09:47 PM.

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