AppleScript In Web Publishing...

I know almost nothing about the use of AppleScript in print publishing, so I haven’t got a clue how it might be used in web publishing either. I assume it is, in some capacity…

Can anyone point me to an overview of how AS might be used in the process of generating complex HTML pages? My guess is AS would be used to fill in existing templates rather than creating entire pages at a time, but I’m curious how it’s done. A ‘simple’ example of what I’m asking about would be a Google News page… no, not the search aspects of it, but the formatting of the page, and the placement of images and stories.

Just thought there might be some folks here who have some experience in this area.

Thanks Much.

Peter B.


Web publishing really isn’t one of AppleScript’s strong suits. I would strongly recommend going to Perl/Python/Ruby/PHP for any sort of web work. All have spent years assembling absolutely excellent web-related infrastructure, from simple CGI, database and templating libraries all the way through to full web-application frameworks, CMSes, etc. (Perl, Python and Ruby also have very good Apple event bridges available if you need to integrate with scriptable desktop apps.)

AppleScript is extremely poor by comparison, and you’ll almost certainly end up writing a ton more code that won’t work nearly as well. You could look around for scriptable HTML editors that provide templating/page generation support (e.g. iWeb has a few commands in its dictionary); there might be something there that you could use. The only HTML templating library I know of is HTMLTemplate, which I wrote a few years back (it works, though the later Python version is much faster and easier to use]).

HTH

has

We had a thread here shortly where a user was trying to use Applescript to generate 100s of pages by reading data and replacing values in a template file.

Check out the thread here - http://bbs.applescript.net/viewtopic.php?id=20318

has & James:

Thanks to both of you…

I’m just now beginning to try and wrap my head around how all this is done on the web. I need to go back in my hole and think about it for a while.

Studying the thread about working with Excel will help me (I think) understand how the basic HTML / AppleScript / DB relationship works.

I’ve never done any web whacking to speak of, and am now trying to build a meaningful (local) interactivity… using web examples.

Mainly, I’m playing at the moment, and likely nothing will come of this…

But you never know.

Peter B.