Re: AppleScript --> HTML
Re: AppleScript --> HTML
- Subject: Re: AppleScript --> HTML
- From: Nigel Smith <email@hidden>
- Date: Tue, 12 Aug 2003 17:14:11 +0100
On 25/7/03 21:07, "John Delacour" <email@hidden> wrote:
>
Here's a script to produce a css header based on the plist -- I don't
>
guarantee the validity of it but it's not far out.:
Belated thanks to JD for that -- it wasn't what I was after, but might come
in useful later.
In case anyone has forgotten, I wanted to convert a Script Editor 2 compiled
front document into HTML, using CSS tags to show variables, keywords and so
on, rather than colour and font settings. The advantage would be that
someone could post code on a web page, and anyone could view it using either
the default stylesheet or one they created to match their own SE settings.
I've finally got a reasonably working version, with a few provisos:
It's slow, especially in the HTML entity encoding section
Only a few "weird characters" are accounted for in the entity encoding
section, but it is easy enough to add more to the list.
There is little or no error checking -- but it hasn't gone wrong yet :-)
The only way I could get the SE2 preference changes to take effect was
by quitting and relaunching SE2 -- anyone have any better ideas?
Rather than post the script here, I've used it on itself and put it on the
web:
<
http://www.welc.cam.ac.uk/cacheTest/scriptToHTML.scpt.html> -- Apple's
default formatting
<
http://www.welc.cam.ac.uk/cacheTest/scriptToHTML2.scpt.html> -- bulging
variables (blinking if you use Netscape) and other sick-inducing styles :-)
The only difference between the two is that I changed the stylesheet link --
the rest of the HTML is the same.
Later,
Nigel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.