You are not logged in Log in Join
You are here: Home » Members » rossl » ZMirror Product. Zope -> static html » swpackage_view

Log in
Name

Password

 
 

ZMirror Product. Zope -> static html

About Zmirror... ZMirror - product at last...


This product is not under active development. Good luck if you find a use for it....

This is some brief documentation for the ZMirror product. Last updated Sept 12,1999.

This is beta code. I use it regularly and it works for me. YMMV

ZMirror is a Zope Product to create a filesystem static html mirror of a zope site. Free for use in educational and not-for-profit organizations. If you're using this to generate profit, you are asked to negotiate a license fee with me.

Great but why not use wget ?

Good question - feel free. I wanted something which just dumped my zope stuff for static serving but I wanted to control it within the zope framework.

Great for belt-and-braces situations (you want to use WHAT to serve our company's web pages ?) - show your boss the static pages quickly scripted out using zope but served with apache. Completely useless for dynamic (eg database driven) sites with fast changing backend data. Potentially useful where you can remirror the site everytime it changes - like a few times a day. Possibly useful for generating complex static sites or dynamic but slowly evolving sites. Very useful if wget gives such ghastly path names that you want to weep - like when you run zope under apache and end up with paths like .../cgi-bin/zope/foo/bar/thing.

Note that if you use zope's dtml image tag, you may find some trouble. I use conventional html img tags. Since these imply the image type in a filename, I make sure my zope images have id's like thing.gif - in fact there's some code in there but I haven't tested it properly. Let me know how it goes please.


Installation

Like all Zope products, the distribution archive must be untar'd from the top level of the zope you are using.
/usr/local/bin/tar fxvz ZMirror.tar.tgz might be the right magic spell for you but unfortunately tar is associated with many regional voodoo variations.... Of course, the .tgz extension works fine with winzip.
If you held your mouth just right and the stars were in the right place, it should unpack all it's contents into a new folder called [yourzopepath]/lib/python/Products/ZMirror
Restart your Zope and see if the Control_Panel/Products folder now contains a healthy ZMirror - it it's a "broken product", read the traceback thoughtfully...

To mirror a Zope project, add a ZMirror object to the top level folder of the project. You'll get a screen of configuration items


Adding a new ZMirror

The file system path on this machine is where static html and image files will be written. Make sure Zope has write access in the directory !. The subfolder only option controls which Zope objects are included - you can choose everything in (and below) the folder you are making this new ZMirror in or only stuff below this folder. The latter is generally the best choice, since you probably do not want all your standard_html_header and so on stuff written out ?. The overwrite even if current option controls whether ZMirror looks at Zope object modification times, writing them only if they are later than the file datetime stamps.

Use the "Mirror" management tab to run the mirror process. This screen will have the most recent log of activity at the bottom and this will be updated everytime you run the mirror.

Assuming that your ZMirror lives at a URL like http://www.yoursite.edu/zpages/ZMirror, then you can do the equivalent of clicking on the "mirror" tab in the management screen by "viewing" the URL http://www.yoursite.edu/zpages/ZMirror/fileall - very handy for automating the task or associating it with dtml which updates the site.

enjoy...


    Change log:
  • 12/9/99 - added b flag to file opens as bad static image files reported under windblows. No news so I assume it works now..
  • 10/9/99 - some documentation on edit and add screens to make things a little easier
  • 9/9/99 - great date - we survived so far. Productified using mkproduct - still lots of headbanging to get it working. Strange differences in the namespace cf external methods...
  • 15/6/99 - checks all timedate stamps and only updates disk files when they are earlier than the zope objects
  • 10/6/99 - moved all images to a dictionary assembled on the fly which is then processed at the very end since images are often reused. Serious aggravation ! Img tags often have relative urls like ../../image/thing.gif which need to be rationalised with the base path of the mirror site. It works for me more or less

Latest Release: 0.003b
Last Updated: 1999-09-15 10:31:05
Author: ZopeOrgSite
Categories: External Access
Maturity: Development

Available Releases

Version Maturity Platform Released
0.003b Development   1999-09-15 10:31:05
  ZMirror.tar.tgz (20 K) All md5