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

 
ofexport - export to text, taskpaper, html, opml Thread Tools Search this Thread Display Modes
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)
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.)
 
Quote:
Originally Posted by kingsinger View Post
A short, flat task list seems like something that could be useful to more people than just me.
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 --tasks 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
Quote:
Originally Posted by kingsinger View Post
The dates are in the right order within the context...
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.
 
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)
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:
Originally Posted by kingsinger View Post
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?
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.
 
V2.1.6 will put undated items below dated ones when sorting by start or due - which is far more sensible.
 
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:
Project
-Task
Project
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?
 
Quote:
Originally Posted by kingsinger View Post
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:
Project
-Task
Project
I don't necessarily want a double space between the two lines. The bulletin board software put that in there.
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",
where:
  • \n = newline
  • \t = tab

I do something similar in the TaskPaper template to print the link to the OmniFocus task in a note on the next line.
 
Quote:
Originally Posted by kingsinger View Post
... 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?

For Hazel, your OF database will likely be in one of these two locations (depending on how you purchased it):
  • Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2
  • Library/Caches/com.omnigroup.OmniFocus.MacAppStore/OmniFocusDatabase2

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
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
 
... (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.
 
Awesome. Thanks for your help!
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch Export OO to OPML or Text adgirard OmniOutliner 3 for Mac 0 2012-10-04 11:53 AM
.html extension on dynamic html export pairustwo OmniOutliner 3 for Mac 3 2011-09-10 01:53 PM
Bug - Export as TXT (TaskPaper) Vlad Ghitulescu OmniFocus 1 for Mac 2 2011-04-29 03:36 AM
Pasting Taskpaper-format text into OmniOutliner RobTrew OmniOutliner 3 for Mac 1 2011-01-11 05:00 AM
Export Properties:Notes as HTML Roll Over Text? jeffreykennedy OmniGraffle General 6 2009-10-26 07:40 AM


All times are GMT -8. The time now is 07:13 AM.


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