Do you know how to use "attribute run" with Safari?
______________________________________________________________________
Hey There,
That looks like it goes back to Tiger.
As far as I know you cannot extract styled-text directly from Safari these days, although perhaps Shane can come up with a Mavericks/Yosemite Library to do it.
The only way I know is to use an html-to-rich-text tool like OSX's `textutil`
cat <file> | textutil -stdin -stdout -format html -convert rtf -encoding UTF-8
------------------------------------------------------------------------------------------- tell application "Safari" tell front document to set ¬ {_name, _src} to {name, do _javascript_ "window.document.documentElement.outerHTML"} end tell -------------------------------------------------------------------------------------------
Grab the source from Safari
Save it to a file to avoid problems with quoting and too much text on the command-line.
Run the shell-script from AppleScript or otherwise.
-- Best Regards, Chris
|