[Zope-Annce] Enhanced load_site.py
Sun, 13 Feb 2000 14:41:11 +0200
load_site.py lets you load files from the harddisk into Zope. The version
included with Zope has a number of problems, however - it generates ugly
DTML and loses some information when importing HTML files using the -D
option. My enhanced version fixes these problems, and also lets you fix the
"?" instead of "'" problem with Windows generated HTML.
You can download it at http://www.zope.org/Members/itamar/load_site/
I also have a version that matches the latest CVS version, but it's untested
so I didn't upload it - email me if you want it.
Changes to my version:
1. Generate Zope 2 style dtml - "<dtml-var standard_html_header>"
instead of <!--#var standard_html_header-->.
2. When using -D option:
a. The contents of <head></head> is loaded to a property of the DTML
Document called loadsite_header instead of loadsite-header (Death to
b. the attributes of <body> (e.g bgcolor, text, onLoad) are stored in a
property called loadsite_bodyattribs.
option. Why should you want this? If you use Dreamweaver to create pages,
pages, just one. Saves bandwith, saves time when you fix bugs.
4. Added -c option to clean up "curly quotes" generated by Windows apps like
Word which show up as '?' in Linux (and Macs?).
Here's an example standard_html_header for use with my load_site.py
pages use in /common.js):
<dtml-var loadsite_header missing>
<body <dtml-var loadsite_bodyattribs missing>>
Itamar S.-T., firstname.lastname@example.org