Re: formatting AS source for web
Re: formatting AS source for web
- Subject: Re: formatting AS source for web
- From: Bill Cheeseman <email@hidden>
- Date: Wed, 01 Aug 2001 15:52:06 -0400
on 8/1/01 11:53 AM, Robert J. Rust at email@hidden wrote:
>
Does anybody know of a good way to format AppleScript source code for the
>
web (including retaining syntax hilighting)? The only way I've found so far
>
is to copy and paste from Script Editor into MS Word, then save as HTML.
>
Unfortunately Word creates excessively bloated HTML documents. I'm hoping
>
there's a better way.
For years I have been using an AppleScript I wrote, which takes advantage of
the superlative scripting capabilities of the Style scriptable text editor.
Basically, you copy a formatted AppleScript from Script Editor or whatever
to the clipboard, then you run my script. It pastes the formatted script
into Style, then adds appropriate html tags to preserve the formatting, then
places the html text back on the clipboard. From there, you paste into your
html editor. It's very fast.
You'll find my script, 'Script2HTML', in the "Scripts" chapter of The
AppleScript Sourcebook.
You'll find examples of its output throughout the "Scripts" chapter.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
The AppleScript Sourcebook - www.AppleScriptSourcebook.com
Vermont Recipes - www.stepwise.com/Articles/VermontRecipes