Is there any way to do a 'search and replace' in a Zope folder (and it's subfolders)? TIA Lee Hum Communications Ltd.
At 21:03 19.11.2000, you wrote:
Is there any way to do a 'search and replace' in a Zope folder (and it's subfolders)?
AFAIK: no. But on the other hand: why do you need it? That's what objects are for... Just create a method with the text that may change sometimes and is displayed on many pages, and include it with <dtml-var ..>. One possibility I see is: export the folder as XML, edit the file in your favourite text-editor and do a search 'n replace. (with the <dtml-var>, of course ;-) Then import the file again. Hope this helps, Martin
Ouch! Zope has no built in way to do search and replace? As an editor, that is a *very* serious drawback indeed! The first workaround you suggest may be useful when creating new pages although only when you can guess what might change in the future and it also requires that all of the people creating content think like programmers, not writers. The second approach seems somewhat risky, complex and challenging for an unsophisticated user. Isn't replacing text one of the most fundamental tasks when creating and maintaining a web site or any other set of documents, for that matter? Shouldn't there be a S & R tab on every folder object that provides a choice of replacing html, dtml or text and that spits out a report on what was changed? Or even better, that first gives you a report of *proposed* changes and then allows you to check off the ones you want to ok. Lee Hunter Hum Communications Ltd.
-----Original Message----- I wrote:
Is there any way to do a 'search and replace' in a Zope folder (and it's subfolders)?
Martin Winkler replied
AFAIK: no. But on the other hand: why do you need it? That's what objects are for... Just create a method with the text that may change sometimes and is displayed on many pages, and include it with <dtml-var ..>. One possibility I see is: export the folder as XML, edit the file in your favourite text-editor and do a search 'n replace. (with the <dtml-var>, of course ;-) Then import the file again.
Hope this helps,
Martin
_______________________________________________ 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 )
Lee Hunter wrote:
Shouldn't there be a S & R tab on every folder object that provides a choice of replacing html, dtml or text and that spits out a report on what was changed?
Oho, I like it. Yes, please!!!
Or even better, that first gives you a report of *proposed* changes and then allows you to check off the ones you want to ok.
Yes, definitely you should have a chance to verify. --Paul (no relation to Martin AFAIK!) -- ................. paul winkler .................. slinkP arts: music, sound, illustration, design, etc. web page: http://www.slinkp.com A member of ARMS: http://www.reacharms.com
You'd have to write a method, looping over the documents you want changed an doing a <dtml-call "_.string.replace('somehing','other')"> and a manage_edit_whatever-holds-your-content... This ought be a method of folders by default, i think, accessible by manager from the management interface.. (Regexps would be neat here..) -- Geir Bækholt web-developer/designer geirh@funcom.com http://www.funcom.com on Sunday, November 19, 2000 Lee Hunter wrote : LH> Is there any way to do a 'search and replace' in a Zope folder (and it's LH> subfolders)? LH> TIA LH> Lee LH> Hum Communications Ltd. LH> _______________________________________________ LH> Zope maillist - Zope@zope.org LH> http://lists.zope.org/mailman/listinfo/zope LH> ** No cross posts or HTML encoding! ** LH> (Related lists - LH> http://lists.zope.org/mailman/listinfo/zope-announce LH> http://lists.zope.org/mailman/listinfo/zope-dev )
FWIW, there used to be the replace product that worked great for me with Zope 2.1.6. Pity I upgraded ;) Stefan
On Sun, 19 Nov 2000 15:03:46 -0500 you wrote:
Is there any way to do a 'search and replace' in a Zope folder (and it's subfolders)?
Ha! Funny you'd mention this in this way. I've thought that a search and replace could be used on www.zope.org to help force Zope documenters to use "it's" correctly by replacing each occurrence with "it is" in all documents. Think it'd work? --kyler
participants (6)
-
Geir B�kholt -
Kyler B. Laird -
Lee Hunter -
Martin Winkler -
Paul Winkler -
Stefan H. Holek