Last modified: 2014-09-09 02:23:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57046, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55046 - replace.py and one-by-one modification
replace.py and one-by-one modification
Status: NEW
Product: Pywikibot
Classification: Unclassified
Other scripts (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:09 UTC by Kunal Mehta (Legoktm)
Modified: 2014-09-09 02:23 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:09:41 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
Comment 1 Kunal Mehta (Legoktm) 2013-10-05 04:09:43 UTC
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\!
Comment 2 Kunal Mehta (Legoktm) 2013-10-05 04:09:45 UTC
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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links