Nifty! I guess I should up my code reading and understandig skills...
Thanks for the explanation.
Cheers!
Siebrand
-----Oorspronkelijk bericht----- Van: pywikipedia-l-bounces@lists.wikimedia.org [mailto:pywikipedia-l-bounces@lists.wikimedia.org] Namens Daniel Herding Verzonden: maandag 6 augustus 2007 18:50 Aan: pywikipedia-l@lists.wikimedia.org Onderwerp: Re: [Pywikipedia-l] SVN: [3964] trunk/pywikipedia
Am Montag, 6. August 2007 18:01 schrieb Siebrand Mazeland:
It must be my blue eyes and blond hair, but how exactly is it now possible to run replace.py on all pages containing a particular url as reported by Special:Linksearch? I only see a reference to spamremove.py in your reply and there are currently no references to `linksearch`, or ´LinksearchGenerator´ in replace.py other than in the top if the file (documentation)...
Hi Siebrand,
You can run this:
python replace.py a b -weblink:http://www.example.org
The magic is in these lines:
# This factory is responsible for processing command line arguments # that are also used by other scripts and that determine on which pages # to work on. genFactory = pagegenerators.GeneratorFactory() [...] generator = genFactory.handleArg(arg) if generator: gen = generator
The newest version of replace.py has updated documentation.
Daniel