> Hello Andy, thanks for the advice.
> It didn't work. Maybe I'm wrong at any point, so please tell me whether
> it worked for you.

> I'm aware that this problem has been discussed here before, that it
> happens because of Python's object naming, and also that there's a
> workaround at least (and just)for expressions, using _['whatever.html']

> Due to the kind of workflow we have, we need all of the documents to be
> editable with Dreamweaver at any moment, directly, after the daily WGET
> process. Batch-replacing every "_html" with ".html" in file names and
> content seems to be very complicated within this scenario.

not overly complicated,
here is a slightly modfied script (untested) which I used 
for a similar task (creating an "offline"-version for a client):

rm -rf myimport
wget -r -k
mv myimport/
rm myimport/index.html
perl -pi -e 's/<base href="http:\/\/*//g' `find myimport/ -type f`
perl -pi -e 's/(.*)_html/$1\.html/g' `find myimport/ -type f`
mmv ';*_html' '#1#2.html'
zip -r myimport.zip myimport/*

Things to check

- Check the regular expressions and mmv part, I had to change them without testing 
(not certain about the (.*) and the mmv (-> multiple move) syntax)
- Instead of relying on _html to mark html-files one could use file(1) - but then
one would have to make a list of renamed files in order to change the relevant
- Improve the regex for changing links, it might capture _html in text (but how
often does that occure)


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to