Below is a simple AppleScript to collect all bits of text that have italic formatting. It takes advantage of Tinderbox’s built-in html export capabilities. (I used italic because bold export seems to be broken in Tinderbox 9.0. No markup in the html. )
- Copy-paste the script into Script Editor (in Applications > Utilities).
- Make sure the HTMLExportTemplate is present in the Tinderbox document (in the menu choose File > Built-in Templates > HTML)
- Select the container with notes containing excerpts formatted in italic and click the
run
button in Script Editor. The results will be placed on the clipboard for pasting wherever.
(If “nothing happens” make sure Script Editor is listed and checked at System Preferences > Security & Privacy > Privacy > Accessibility.)
The script:
-- get the Tinderbox export html -- italic will be within <i> </i> tags.
tell front document of application "Tinderbox 9"
if not (exists selection 1) then error "Select the container and run again"
tell selection 1 to set htmlStr to evaluate it with "exportedString(this,$HTMLExportTemplate)"
end tell
-- "chunk" the text to isolate the italic bits
set text item delimiters to {"<i>", "</i>"}
set textItems to text items of htmlStr
-- gather the even chunks (the italic items) into an AppleScript list
set italicItems to {}
repeat with i from 2 to length of textItems by 2
set end of italicItems to item i of textItems
end repeat
-- convert the AppleScript list to text and place on clipboard
set text item delimiters to return
set theExcerpts to italicItems as text
set the clipboard to theExcerpts
return theExcerpts -- to view in results panel