Global Search & Replace inside DTML Documents
I've imported a bunch of files created in (ugh) FrontPage. They're riddled with extraneous and unpleasant font tags. I've reached the point where I'd love to simple nuke ALL font tags that live in DTML Documents. I can write the regular expressions that do this, does anyone have a quick code snippet that illustrates how to walk all of the subfolders of a given Zope folder, perform some kind of transformation on each DTML Document contained in the folder, then save out the new version? TIA, Howard Hansen http://howard.editthispage.com
Use ReplaceSupport product: http://www.zope.org/Members/shh/ReplaceSupport/ I haven't tested this product, but the patch I tried -whom this release is based on- used to work fine. Ausum ----- Original Message ----- From: "Zope" <zope@halfmagic.com> To: <zope@zope.org> Sent: Thursday, September 06, 2001 11:59 PM Subject: [Zope] Global Search & Replace inside DTML Documents
I've imported a bunch of files created in (ugh) FrontPage. They're riddled with extraneous and unpleasant font tags. I've reached the point where I'd love to simple nuke ALL font tags that live in DTML Documents. I can write the regular expressions that do this, does anyone have a quick code snippet that illustrates how to walk all of the subfolders of a given Zope folder, perform some kind of transformation on each DTML Document contained in the folder, then save out the new version?
TIA,
Howard Hansen http://howard.editthispage.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
I just want to add that if what you want is to replace just html tags, it's better that you do it in Dreamweaver, before importing to Zope. It has the best find-and-replace tool I've seen in a web design tool. Using DW you just need to perform a "strip tag" routine, maybe in addition to the command "clean up word html". If you've get rid of the original files, you might need to retrieve them via FTP. (It's much better that perform the replace within Zope.) Ausum ----- Original Message ----- From: "Zope" <zope@halfmagic.com> To: <zope@zope.org> Sent: Thursday, September 06, 2001 11:59 PM Subject: [Zope] Global Search & Replace inside DTML Documents
I've imported a bunch of files created in (ugh) FrontPage. They're riddled with extraneous and unpleasant font tags. I've reached the point where I'd love to simple nuke ALL font tags that live in DTML Documents. I can write the regular expressions that do this, does anyone have a quick code snippet that illustrates how to walk all of the subfolders of a given Zope folder, perform some kind of transformation on each DTML Document contained in the folder, then save out the new version?
TIA,
Howard Hansen http://howard.editthispage.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Thu, 6 Sep 2001, Zope wrote:
I've imported a bunch of files created in (ugh) FrontPage. They're riddled with extraneous and unpleasant font tags. I've reached the point where I'd love to simple nuke ALL font tags that live in DTML Documents. I can write the regular expressions that do this, does anyone have a quick code snippet that illustrates how to walk all of the subfolders of a given Zope folder, perform some kind of transformation on each DTML Document contained in the folder, then save out the new version?
<shameless plug="ON"> I suggest you to try ZShell, the Zope Shell, which should solve your problem in minutes. you can download ZShell from http://cortex.unice.fr/~jerome/zshell/ ZShell allows you to type commands similar to that of a Unix shell directly from your web browser to manipulate ZODB's content. You should especially try ZShell's "grep" command which allows recursive search and replace with regular expressions. ZShell's "man" command is your best friend. </shameless> hoping this helps. bye, Jerome Alet
participants (3)
-
Ausum -
Jerome Alet -
Zope