making a static (offline) copy of the etoy.HISTORY

so we have to generate a static (offline) copy of the history, a zope-based tool. in principle, (assuming you have wget and a command-line handy), you can do it like so:

wget --span-hosts --mirror --convert-links --page-requisites,,

this should recursively suck the whole site plus any dependencies located on and, as well as convert absolute urls to relative ones, where applicable.

note though, that the zope item.absolute_url() call, which in principle generates the absolute url of some item (sic), does _NOT_ append trailing slashes for folders, which means that as wget sucks some sampleFolder, it will first get the sampleFolder/index.html, and store it as sampleFolder (which is now a html document). it will then proceed to suck all the stuff referenced in sampleFolder/index.html. now comes the problem: if this references any files in sampleFolder, it will remove the local (html document) sampleFolder, generate a folder sampleFolder, and put those files in there --- your sampleFolder/index.html is lost!

in other words, when calling item.absolute_url(), for a folder in zope, you currently have to manually specify that a trailing slash be appended, which is ugly, but fortunately simple enough: item.absolute_url() + "/" so your precious data is requested with a trailing slash and saved as sampleFolder/index.html, as it should be.



No new comments allowed (anymore) on this post. twisting values since 1994