[Pywikipedia-l] [ pywikipediabot-Patches-1843798 ] Add capabiliy to remember pages to replace.py

SourceForge.net noreply at sourceforge.net
Tue Dec 4 02:45:58 UTC 2007


Patches item #1843798, was opened at 2007-12-04 03:45
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1843798&group_id=93107

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Pietro Battiston (toobaz)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add capabiliy to remember pages to replace.py

Initial Comment:
When doing very long semi-automatic replacements, it can happen to kill the bot and to start again. So you have to say "no" again to all non wanted replacements. It is even worse if you're using an xml dump: it can be several weeks old, and it will make you download lot of pages that where ALREADY corrected.

This patch consist in two parts:
1) a patch to replace.py that adds a new parameter, "-exclude", and makes it accept a path to a file which will be used both for:
-> knowing which articles to exclude from substitution
-> logging denied replaces' pages and pages already known to be not needing replacements 
2) a patch to pagegenerators.py that adds a generator filter, able to yield only pages not appearing in a given list

The only doubt I have is: should the replace.py log in some other way? xml? wikipedia module's predefined functions? log into a given wikipedia userpage (so that logs can easily be shared)?

As I've done it, it needs to import os and codecs modules... don't know if it's a problem.

Anyway, a patch like this is something really needed, if needed I can try to improve it.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1843798&group_id=93107



More information about the Pywikipedia-l mailing list