[Zope] improved load_site.py

marc lindahl marc@bowery.com
Sun, 15 Jul 2001 14:44:40 -0400


I put a couple hour's work into the stock load_site.py that comes with
2.3.3, and made the following changes & improvements:

-r replace files (individually - doesn't blow away directories) by
re-uploading them.

-R replace directories (blowing away anything inside)

-a use Audio product for any audio files (since I was uploading a site with
some mp3's)

-A delete and re-Add any audio files (kind of a fixup for refreshing a
pre-Audio site upload)

I cleaned up the handling of images as well, recognizing more image types,
and improved the error handling, so the thing will print errors but will not
bomb out.  The -v option spits out lots more info now.

Also, used url_quote, since the original load_site didn't and thus couldn't
deal with filenames with spaces in them (sure, it's a no-no, but the site
was hosted on a Mac where such things are a non-issue).

Link to the file here: http://www.zope.org/Members/bowerymarc