I’ve been using this little script for a while:
Click to show script
# Select Tinderbox notes (non-contiguous, multiple levels ok) and click run.
# Places quoted character-separated values (CSV) on clipboard for pasting wherever.
# 1. List the attributes in line below, each between quotes. Add/remove/reorder as needed
set grabAttribs to {"Name", "CityName", "SourceName", "Themes", "MyBoolean", "NoteURL", "Path", "Text"}
# 2. And set a delimiter here. Try tab or "," or "|" or ";" or whatever the receiving app expects
set myDelimiter to ","
-- NO USER TINKERING NEEDED BELOW THIS LINE, at least in theory;)
set text item delimiters to quote & myDelimiter & quote
# create separate list to hold lists of attribute values (a "list of lists")
copy grabAttribs to attribVals
set numCols to grabAttribs's length
tell application "Tinderbox 8"
tell front document's selections -- (note use of plural)
repeat with i from 1 to numCols
set attrName to grabAttribs's item i
set attribVals's item i to attribute attrName's value
# adds list of this attribute's values to the list of lists
end repeat
end tell
end tell
set numRows to attribVals's item 1's length
set outStr to quote & (grabAttribs as string) & quote & return # header row
repeat with i from 1 to numRows
set rowItems to {}
repeat with j from 1 to numCols
set rowItems's end to attribVals's item j's item i
end repeat
set outStr to outStr & quote & (rowItems as string) & quote & return # body row
end repeat
set the clipboard to outStr
--return outStr -- uncomment this line to view output in Script Editor 'Result' pane
Copy-paste into Script Editor (in Applications > Utilities) or into your other script editor of choice.
Make sure Script Editor and Tinderbox are listed and checked at System Preferences > Security & Privacy > Privacy > Accessibility.
In the first non-commented line just list the names of the attributes you want (between quotes as shown) in the order that you want them in the spreadsheet.
In the second non-commented line set the delimiter you want to try (tab or , or ; all tend work well with Numbers and Excel but you could use others as well).
Select the Tinderbox notes you want to export, and click ‘run’ in Script Editor.
The results will be placed on the system clipboard. You can then paste them into Numbers or Excel or wherever.
From start-to-finish (from copy-pasting the script and editing attribute names to pasting the data) the process takes about a minute or two.
Got the order wrong? Forgot something? Didn’t need something? The chosen delimiter didn’t quite do the job? Just edit either or both of the first two uncommented lines in the script and click again. This can’t do anything that traditional Tinderbox export can’t do but (for me) it is quicker to adjust.
I’ve found this useful for taking with me a rough approximation of the Attribute Browser on the iPad. Once the data is in Numbers I can easily group it by attribute value by using the Smart Categories feature. (Doesn’t group by individual members of sets, though).
For cases where the csv (character-separated value) approach gets choked by unpaired embedded " (straight quotes) or embedded tabs or whatever, it would not be hard (though the script would noticeably slower) to have the script generate a table in Numbers and set values in its cells rather than paste them in.