It's damn quick: ~ 0.07 sec on my system. Although that's slow compared to the old rsrc script. :)
I posted the `osadecompile` code, because most folks on the list aren't using Script Debugger.
I also think it's a nice shell-script example.
-------------------------------------------------------------------------------------------
use OLb : script "OLb"
use scripting additions
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
set scptLibFldr to alias ((path to library folder from user domain as text) & "Script Libraries:")
set libFiles to glob "*Lb*" from scptLibFldr as POSIX path
set libFiles to change "$" into "Contents/Resources/Scripts/main.recover.rtf" in libFiles with regexp
set tempSource to ""
repeat with _path in libFiles
set tempSource to tempSource & (OLb's rtf2Text:_path) & return & return
end repeat
return tempSource
-------------------------------------------------------------------------------------------
--» HANDLERS (ASObjC Library Required on 10.9.x)
-------------------------------------------------------------------------------------------
--» rtf2Text:
-------------------------------------------------------------------------------------------
-- Auth: Shane Stanley
-- Task: Extract plain text from an RTF file.
-- dMod: 2014/03/23 14:22
-------------------------------------------------------------------------------------------
on rtf2Text:thePath
set attString to current application's NSAttributedString's alloc()'s initWithPath:thePath documentAttributes:(missing value)
return (attString's |string|()) as text
end rtf2Text:
-------------------------------------------------------------------------------------------