Last modified: 2014-09-09 02:23:31 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/288/ Reported by: crochet_david Created on: 2011-07-20 10:02:48 Subject: replace.by and one-by-one modification Original description: When the robots need to make multiple modification in a one page, it do it all. But, in some case, some modifications not need to be done. So add a new parametre as "-single" to tell each modification to be done in a page
Hi David, by the time it will be solved within textlib.py \(it has the replaceExcept\(\) function\), I warmly suggest you this tutorial that I wrote recently: http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/Fixes\_and\_functions\_HOWTO Your problem is solved there. Have fun\!
Replace.py calls replaceExcept\(\) from textlib.py, but the confirmation of replacements offered by textlib.py takes place in replace.py. Therefore it would be very difficult. But there is a way to do that with a very small programming. Please have a look at http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/Fixes\_and\_functions\_HOWTO\#Choosing\_between\_two\_replacements\_in\_runtime\_.2F\_K.C3.A9t\_csere\_k.C3.B6z.C3.B6tti\_v.C3.A1laszt.C3.A1s\_fut.C3.A1sid.C5.91ben, where the first example is your friend. With a minimal rewrite of it you may confirm each modification separately. I think this is much simpler than rewrite both replace.py and textlib.py. Is that an appropriate solution for your peoblem?