OmniOutliner AppleScript to Append a Note to Selected Rows

In the last of three postings I wrote on note taking for the dissertation about a year ago, I proposed a kind of a note taking software that would allow researchers to link the huge gap between our notes on individual sources and that which we do when outlining and structuring large writing projects.

I argued that one of the key elements of this new note taking software would be that every bullet point in one’s notes carried within itself information about where it came from: what its source was.1 This would allow a graduate student like me who is writing a dissertation or a scholar who is writing a book to drag and drop individual bullet points of notes made on a given source, such as an archival document into a broader outline of a chapter or dissertation without having to make an additional note as to what source I got that bullet point from.

This is particularly useful if, like me, you have dozens of pages of notes, taken from hundreds of archival documents, books, articles, etc. but you want to extract individual points from these sources and compile them into a larger outline as you plan the writing process.

While the tooth fairy never produced such software for me, I have created a little AppleScript hack for my favorite note taking software OmniOutliner that gets me closer to what I want. Simply put, the applescript assigns some text to the “note” field of a group of selected bullet points in an OmniOutliner document. Thus, if those bullet points are dragged and dropped into another document, they will always carry with them whatever source information you assigned to those bullet points.

I created two AppleScripts: One which takes whatever text is in the clipboard and sets the “note” of each selected row in your notes to that text. The second script ignores the clipboard and asks you directly in a dialog box what text you wish to put into the “note” of each selected row. You may download these two scripts from my Huginn script collection:

Set Note to Source

I don’t get it, why would you want to do this? Watch my screencast where I explain what I’m trying to do. If the youtube video below doesn’t appear, you can visit it directly on youtube through this link.

(Sorry about the poor sound quality)

How do you get this work?

1. Download the script.
2. Place the “Set Note to Source in Clipboard” script in one of your script folders (either that for OmniOutliner or in the [your home folder]/Library/Scripts/
3. Open OmniOutliner
4. Select some text that corresponds to the source of some notes that you took, and Copy it via the edit menu (or Command-C).
5. Select one or more rows that you wish assign this source to.
6. Choose the “Set Note to Source in Clipboard” script from the script menu. If your script menu is not visible in the menubar, turn it on.
7. If you find yourself doing this often, consider adding a keyboard shortcut for the script, using triggers for quicksilver or fastscripts or the like.

  1. I also suggested adding the ability to easily add tags to a bullet point and those bullet points under it. []

2 thoughts on “OmniOutliner AppleScript to Append a Note to Selected Rows”

  1. Very interesting to find this tonight while searching the web for omnioutliner scripts. I am a biomedical researcher and wanted a similar solution — a simple way to retain source info with every little chunk of data. In addition, I wanted to go one step further, tagging each snippet of information with some metadata. This would enable me to quickly aggregate (find) all notes taken from different sources that share a common concept or theme.

    At this point, I am using columns rather than making use of the Note property. Time will tell if that is a good strategy or not.

    To make this feasible in practice, the list of “Note Types” should not be too large and the types should be sufficiently generic to apply across multiple projects. This is a new work in progress for me, my current list of note types is about 10 in size and I can see a few that I will probably drop. Some of my note types: Summary, Function, Biomarkers, Clinical, Distribution, Assays, Safety, Picture.

    When I need to collect all notes that deal with Safety, it is simple to do a batch find or a sort by column. Likewise for Picture – I can very quickly home in on all the figures that I have copied from different sources.

    I create a top level row that contains data for a single source: Title, Authors, Year, Note Type, Bookends. The Note Type cell is blank, the “Bookends” cell contains a hyperlink which will navigate back to the unique reference in the reference manager Bookends. It is easy to populate this row because I have created a custom citation format in Bookends that puts those pieces together with tab as the separator. In Bookends, Cmd-K issues the Copy Selected Formatted command. Back in OO3, I paste the clipboard contents and OO automatically parses the text into the cells of a new row. All notes I take from that source are children of that parent row. As I take notes, I set the Note Type field appropriately from the popup menu.

    Things that would make this more seamless:

    1) Rather than the cumbersome back and forth between apps, a scripted way to get the reference data from Bookends (it’s scripting support is quite poor).

    2) A script that appends clipboard contents to the active cell in OmniOutliner, i.e. the selected text in my PDF reader (Preview or Skim). This should be doable, but I don’t yet know how to set the insertion point or insert text at the end of a cell in OO. The text also needs a little cleaning up as it comes out of Preview.

    3) In step 2 above, can the inserted text in OO also be given a style within the script? (I like to give verbatim excerpts from sources a specific format).

    4) Haven’t thought this far ahead yet, but eventually will need to get selected rows exported and keep the Bookends source information along. Would be nice if Bookends could insert citation codes into OO.

    5) There is an apparent bug in OO3. I can set a keyboard shortcut for a command in the Action menu: Action > Substitutions > Replace Text. I can see the shortcut characters in the menu. But when I type them OO just beeps and doesn’t execute the menu item. This is one approach to performing the clean up of text snippets coming in from PDFs (Preview).

    I am in the midst of a big research and writing project, so we’ll see how this work in progress develops — a technology diversion or actually helpful.

  2. 5. Wonderful goods from you, man. I have understand your stuff previous to and you are just too fantastic. I actually like what you’ve acquired here, certainly like what you are saying and the way in which you say it. You make it enjoyable and you still care for to keep it smart. I cant wait to read far more from you. This is actually a great site.

Comments are closed.