[Zope] load_site

Oleg Broytmann phd@sun.med.ru
Mon, 20 Sep 1999 15:24:32 +0400 (MSD)


Hello, DigiCool, the creator of hot Zope!

<APPLAUSE>
   Yesterday I've upgraded from 1.10.3 to 2.01. I exported old DB, compiled
python with threads, compiled Zope2, ran it, converted export file and
imported data back. All things were pretty smooth, and after import,
Posttres connection reopened automatically - and my little demo was up and
running. Nice, nice, good work! Thank you very much!
</APPLAUSE>

   After upgrade I imported my entire homepage with load_site.py (old site at
http://sun.med.ru/~phd/), new at http://sun.med.ru/~zphd/). All pages
loaded ok, but I found that load_site.py just imported all HTML files as
plain HTML, it isn't even parse titles.
   I think I can modify load_site.py to parse HTML files (I did it many
times with htmllib). If you have no objection I'll publish my patch (where
to post it?)

   My plan on work is the following:

1. Teach load_site.py to parse titles and import into DB only HTML body
(skipping <HEAD></HEAD> entirely), and make the document to have parsed
title.

2. Next thing to do will be to parse META tags and put things to... I think
it will be properties, e.g property "keywords", type "string", value "home
page, homepage, phd".
   Any ideas on this? I hope it wouldn't be too complex to create
properties with ZClient?

   With these properties it will be easy to reconstruct the documents with
standrd_html_header like:

<HTML><HEAD>
<TITLE><!--#var title_or_id--></TITLE>
<!--#in properties-->
   <META name="<!--#var name-->" content="<!--#var value-->">
<!--#/in properties-->
</HEAD>
<BODY>

   Not sure how to write the loop.

   (Sorry, my english is not very good...)

Oleg.
---- 
    Oleg Broytmann  National Research Surgery Centre  http://sun.med.ru/~phd/
           Programmers don't die, they just GOSUB without RETURN.