OxPM: Search and Extract

Kate L Pugh kake at earth.li
Thu Dec 5 06:25:56 CST 2002


On Thu 05 Dec 2002, Julian Martin <julianmartin at ntlworld.com> wrote:
> I do know the pages are well formed cause I made them : ) They exist
> as a set of contact detail pages a.htm - z.htm. Rather than put all
> the info into a database ( unless you know an easy way ) I thought
> it would be a neat way to find say all organisations in Oxford as
> they are listed by organisation name in the pages.
> What do you think ?

I think you might be doing it backwards.  Could you start with the raw
data, store it somewhere, and auto-generate the static pages from that?
You might want to look at DBD::SQLite
  http://search.cpan.org/author/MSERGEANT/DBD-SQLite-0.21/
if you do decide to use a database - it's a driver for a self-contained
relational database that fits in a text file.

For auto-generating the pages, there are loads of solutions.  I like
the Template Toolkit
  http://search.cpan.org/author/ABW/Template-Toolkit-2.08/
  http://tt2.org/
but there are many ways to do it, HTML::Template for example:
  http://search.cpan.org/author/SAMTREGAR/HTML-Template-2.6/

The important thing to remember is that you can auto-generate static
pages too; you don't need to use CGI.  Just make the output of your
generator goes to a file in the right place.  The bloggers call this
"baking", I think, as opposed to "frying", which is generating
dynamically.  Though I think the person who made up that analogy must
not cook very much.

All these modules flying around are reminding me of the Perl Advent
Calendar at http://perladvent.org/ - do take a look.

Kake
-- 
http://www.earth.li/~kake/cookery/ - vegan recipes, now with new search feature
http://grault.net/grubstreet/ - the open-source guide to London
http://www.penseroso.com/ - websites for the fine art and antique trade



More information about the Oxford-pm mailing list