For a long time, I’ve been dealing in my mind with the pros and cons of “plain” outline structures versus topic outlines with their attached notes. Tinderbox works best with the latter (by assigning a $Name
and a $Text
attribute to each note), but I’ve been working with plain outlines for book and article annotations for quite some time (they’re kept in hundreds of OmniOutliner files I’d like to export to OPML and integrate in TBX).
Then recently I came to know the exportedString()
function, and realized how easily I could work with both kinds of structures, by summarizing children notes in the $Text attribute of a “topic” note using a stamp or edict (i. e, $Text=exportedString(this, "/Templates/Annotations Outline Summary"); $ReadOnly=true;
).
It makes sense to me to have all first-level children notes as separate paragraphs, and rarer lower-level notes formatted in a Markdown-compatible “list” format. I’ve almost had complete success, except that I couldn’t find a way to properly indent the list items for those lower-level entries.
I’ve tried ^indent("\t",^value($OutlineDepth(parent) - $OutlineDepth(current) - 1)^)^
, but apparently $OutlineDepth(current)
returns an empty value, and I end up with too many identation tabs. Am I misusing it? My understand was that current
would designate the note where the stamp is applied to.
I would much appreciate some help! By the way, I think this trick might be of interest to many people considering moving from OmniOutliner to Tinderbox, or integrating them (I would have done it much before if I had realized this possibility).
The full export template runs as follows:
/Templates/Annotations Outline Summary:
^children(/Templates/Annotations Outline Summary/Outline item)^
/Templates/Annotations Outline Summary/Outline item:
^if(ChildCount)^^if($Prototype=="Quote")^> ^endif^^value($Name)^^if($loc)^ (p. ^value($loc)^)^endif^
^children(/Templates/Annotations Outline Summary/Outline sub-item)^
^else^^if($Prototype=="Quote")^> ^endif^^value($Name)^^if($loc)^ (p. ^value($loc)^)^endif^
^endif^
/Templates/Annotations Outline Summary/Outline sub-item:
^if(ChildCount)^^indent("\t",^value($OutlineDepth(parent) - $OutlineDepth(current) - 1)^)^- ^if($Prototype=="Quote")^> ^endif^^value($Name)^^if($loc)^ (p. ^value($loc)^)^endif^
^children(/Templates/Annotations Outline Summary/Outline sub-item)^^else^^indent("\t",^value($OutlineDepth(parent) - $OutlineDepth(current) - 1)^)^- ^if($Prototype=="Quote")^> ^endif^^value($Name)^^if($loc)^ (p. ^value($loc)^)^endif^
^endif^