Re: AppleScript --> HTML
Re: AppleScript --> HTML
- Subject: Re: AppleScript --> HTML
- From: Nigel Smith <email@hidden>
- Date: Fri, 25 Jul 2003 15:42:34 +0100
Both JD and Jean-Baptiste replied on how to create a Style Sheet based on a
user's AS formatting preferences (see earlier posts).
Sorry guys, I obviously mis-explained.
The plan should be:
1. Extract, from the .plist, Smile's ASFormat, or whatever, the user's
formatting preferences.
2. Use those preferences to parse the contents of the front script
editor window so you can tag up the text with context-sensitive information.
3. Whip that into HTML.
That way you could publish the script through a web browser without having
to put in loads of colour/font/style changes and, perhaps even better, a
viewer could have their own style sheet override yours so that they see your
script with their preferred formatting.
OK, maybe a moot point once the spiffy new "URL-to-editor" functionality
arrives. But it would be nice to put scripts on the web with "content"
rather than "presentation" markup.
Quick example -- HTML header and so on omitted for brevity:
tell application "Finder"
display dialog "Hello World"
end tell
...would become
<p><span class="langKey">tell </span><span class="appKey">application
</span><span class="op">"</span><span class="value">Finder</span><span
class="op">"</span></p>
<p class="indent1"><span class="appKey">display dialog </span><span
class="op">"</span><span class="value">Hello World</span><span
class="op">"</span></p>
<p><span class="langKey>end tell</span></p>
Perhaps that explains it better,
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.