Home Page the Perl Page Programming and Computer Reviews and Thailand Comments
Snatch - Overview
IE5 & OLE
These docs are not quite finished yet, and the GUI code in particular is messy and filled with experiments.
The XML examples will arrive before the docs.
Snatch now has gotten scheduling primitives, a GUI debugger, drivers for using OLE on IE5
and several other important bits and pieces. The timing stuff means you can theoretically
run Snatch as a background program that does cool things. When I find a more elegant way to check if I'm online I'll demo this.
(30KB) the whole banana
Grabbing Data off the Web with Perl and XML
(and then assembling the bits)
Using an XML style config file with Perl code imbedded in it build an HTML page.
The Perl code is outputting HTML. To avoid driving the programmer crazy the Snatch XML does not demand escaping
little things like "<". Thus it isn't using Real and True (tm) XML.
Inserting &s all over the place while you're coding would be horrible messy. So sue me.
Just as a place to begin lets say a typical Snatch file will look something like this:
|Page Layout Data
And an example item looks like this:
The <sub> elements contain perl code to extract and format snatched information. The item is an XML wrapper around this.
$_="<h3>$1 Estimated Population</h3>";
Page layout looks like this:
my $title="The News for ". localtime($time);
<footer>$_= "time-$time. seconds