Fraser Speirs ([info]fraserspeirs) wrote,
@ 2005-01-08 20:34:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
How to tag rows in OmniOutliner without cluttering it up
I posted earlier about a GTD workflow in OmniOutliner. Recall that this is what it looked like:

My GTD Setup in OmniOutliner

Now, this worked OK, but it had a few flaws that became apparent as soon as I started working with it:

1. Prefixing text to rows is too much visual clutter

David Allen's book talks about people having next-actions lists in the hundreds. I don't have that many, but even in my shorter list of 30 or so, prefixing "[NA]" to every line made it significantly harder to scan the rows.

2. Using sub-items as tags is confusing and distracting

Whenever I saw that a row could be expanded, I was always curious as to what I had stashed away under there. Often I would go in there just to find that it was a bunch of tags.

Fixing it: Styles

I had an epiphany of sorts when I realised that the (amazingly comprehensive) style support in OO3 can be AppleScripted to death. In addition, OmniOutliner Pro lets you give names to styles.

Revised GTD Setup in OmniOutliner

Now, instead of prepending text to a row's content or adding sub-rows, I apply one or more named styles to a row. It is possible to create named styles that have no attributes, so they have no visual effect on the rows that they are applied to.

Firstly, I create 'tag styles' by making attribute-free styles with names beginning with "[Tag]". This lets me find them easily with AppleScript:

set allTagNames to name of every named style of front document ¬
  whose name starts with "[Tag]"


The nice thing about this is that, if you ever do want to distinguish rows with a particular tag, you just change the named style and they'll all show up. I use an AppleScript called "Highlight Tag":

tell front document of application "OmniOutliner Professional"
  set allTagNames to name of every named style ¬
    whose name starts with "[Tag]"
  
  set selectedTags to ¬
    (choose from list allTagNames ¬
      with prompt ¬
      "Highlight which tags?" with multiple selections allowed)
  
  repeat with aTag in selectedTags
    set aStyle to (first named style ¬
      whose name is aTag)
    
    (value of every attribute of aStyle ¬
      whose name is "text-background-color")
    
    set value of ¬
      (every attribute of aStyle whose name is "text-background-color") ¬
        to ({59648, 51200, 9435} as RGB color)
  end repeat
end tell


And then, to clear that highlighting, I simply do:

tell front document of application "OmniOutliner Professional"
  set allTagStyles to every named style whose name starts with "[Tag]"
	
  repeat with aStyle in allTagStyles
    set value of every attribute of aStyle to missing value
  end repeat
end tell


...which may or may not be what you want if you have some tags that you want permanently styled.

Freestyling it: Quicksilver

Having got this basic approach going, I thought about how to make it easier to be lazier. I decided to integrate this with Quicksilver.

In Quicksilver you can find an AppleScript file and then apply a "Process Text" action to it. This calls an "on process text" handler in the script with whatever text you enter in QS.

Here's the script. It takes the text from QS, finds all the projects in the front OO document, asks you which you want to append to, and puts it in there.

I also made a short screen capture video showing it in action. Watch it here (250k).

using terms from application "Quicksilver"
  on process text theString
  -- theString is the text in Quicksilver
    
    -- Get the list of projects from OO
    tell application "OmniOutliner Professional" to ¬
      set projects to topic of every child of front document
    
    -- Get a list of names of projects to append text items to
    set userSelection to ¬
      (choose from list projects with prompt ¬
        "Append to which project/list?" ¬
          with multiple selections allowed)
    
    tell application "OmniOutliner Professional"
      set selectedRows to every child of front document
      -- Same as above OO call, except we're 
      -- getting the rows here and not their topics
      
      set newRows to {}
      -- We use this later to 
      --select all the newly-created rows
      
      repeat with r in selectedRows
        if topic of r is in userSelection then
          set newRow to make new row ¬
            with properties {topic:theString} ¬
            at end of children of r
          
          set newRows to newRows & {newRow}
          set expanded of every ancestor of newRow to true
        end if
      end repeat
      select newRows -- Make newRows the selection
    end tell
  end process text
end using terms from


My AppleScript grammar is still pretty rusty, as you can probably tell.



(Post a new comment)


[info]percible
2005-01-09 03:02 am UTC (link)
You've not had any comments about the Applescript/Omnioutliner/GTD stuff, so I just wanted you to know I am watching this stuff with interest.

I'm hoping to implement a set of scripts that will work with Omnioutliner and Quicksilver to list and maintain tasks and projects for GTD (which I've finally decided to have a go at after reading about it too often and doing nothing). The ideas you're coming up with are interesting and inspiring, thanks for sharing. Hopefully if I come up with something useful I'll post it in my own journal. :)

(Reply to this) (Thread)


[info]fraserspeirs
2005-01-09 09:55 am UTC (link)
Cool. Thanks for writing.

(Reply to this) (Parent)

GTD dmg updated?
(Anonymous)
2005-01-10 05:16 pm UTC (link)
Greetings from Spain!

So, my question would be: Is the disk image oo3 file and scripts updated with this last info?
BTW: thanks a lot for sharing this... gets pretty close to an ideal GTD setup...

Best regards, TFS

(Reply to this) (Thread)

Re: GTD dmg updated?
[info]fraserspeirs
2005-01-10 07:27 pm UTC (link)
No, I haven't updated it yet. I do intend to, but there are still a few things to work out with some of the scripts, and I'm not done yet.

I think I'll make a static page on my website describing the technique in full when it's done.

(Reply to this) (Parent)(Thread)

Re: GTD dmg updated?
(Anonymous)
2005-03-13 08:50 pm UTC (link)
Thank you for sharing the ideas and development with your Omni-AppleScript-QS-GTD application. I haven't tried it yet, as I have almost zero AppleScript experience. I just wanted to encourage you to follow-up with your idea of creating a static page describing the technique in full when it's done. I know how much I would appreciate it, and with the growing interest of a Mac application designed for GTD, I'm certain there would be many others appreciative as well. Thanks again!

Gerry

(Reply to this) (Parent)(Thread)

Re: GTD dmg updated?
[info]fraserspeirs
2005-03-13 08:57 pm UTC (link)
Hang in there! Something's coming along...

(Reply to this) (Parent)(Thread)

Re: GTD dmg updated?
(Anonymous)
2005-04-14 05:41 pm UTC (link)
Anything new on this? :-)

- Todd

(Reply to this) (Parent)(Thread)

Re: GTD dmg updated?
[info]fraserspeirs
2005-04-14 05:55 pm UTC (link)
Not yet, no....

(Reply to this) (Parent)

Great to see
(Anonymous)
2005-01-10 06:55 pm UTC (link)
I just found your OO3/Applescript/QS write up via 43 folders. This is a great primer for newbies such as myself. The possiblities of intergrating this combination into a killer GTD system look endless. Please show us more when you come up with new stuff.

Thanks.

Herb

(Reply to this)

Version for Launchbar
(Anonymous)
2005-02-03 12:58 pm UTC (link)
Hi,
I hacked your script to make it work with Launchbar:



on handle_string(theString)
-- theString is the text in Launchbar

-- Get the list of projects from OO
tell application "OmniOutliner Professional" to ¬
set projects to topic of every child of front document

-- Get a list of names of projects to append text items to
set userSelection to ¬
(choose from list projects with prompt ¬
¬
"Append to which project/list?" with multiple selections allowed)

tell application "OmniOutliner Professional"
set selectedRows to every child of front document
-- Same as above OO call, except we're
-- getting the rows here and not their topics

set newRows to {}
-- We use this later to
--select all the newly-created rows

repeat with r in selectedRows
if topic of r is in userSelection then
set newRow to make new row ¬
with properties {topic:theString} ¬
at end of children of r

set newRows to newRows & {newRow}
set expanded of every ancestor of newRow to true
end if
end repeat
select newRows -- Make newRows the selection
end tell
end handle_string


(Reply to this)

Quicksivler applescript working on OS X 10.3.8 & OO 3.0.1?
[info]leifbrown
2005-02-26 07:47 am UTC (link)
Strangely, I get an empty dialog on the set userSelection command, invoked from Quicksilver.

Is this still working?

(Reply to this)

tweak
(Anonymous)
2005-04-22 05:58 am UTC (link)
My tweaks:
1) an applescript to mark the top-priority item as done, and to re-evaluate everything based on that. I fire this from Quicksilver.
2) I altered the main script so it creates a text file containing the top-priority next action's description, target completion time, and any relevant notes. I use GeekTool to show this text as a floating transparency. This has been *invaluable* to me!
3) Adopted significant prioritization code from PyGTD.

(Reply to this)

I am confused
(Anonymous)
2005-05-22 03:08 pm UTC (link)
What is a tag? I got the following error message: OmniOutliner Professional-beta got an error: List is empty. Do I need to set up OO in a certain way for this to work?

(Reply to this)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…