[Pywikipedia-l] [ pywikipediabot-Bugs-2315533 ] category.py breaks articles with includeonly and noinclude

SourceForge.net noreply at sourceforge.net
Wed Nov 19 19:07:41 UTC 2008


Bugs item #2315533, was opened at 2008-11-19 14:07
Message generated for change (Settings changed) made by djbarrett
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2315533&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: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
>Summary: category.py breaks articles with includeonly and noinclude

Initial Comment:
This is a DEADLY bug that wrecks wiki structure.

I ran "python category.py" to rename one category to another. For articles containing <includeonly> and <noinclude> statements, pywikipedia made incorrect changes.  When renaming category B to category C, the text:

<includeonly>[[Category:A]]</includeonly><noinclude>[[Category:B]]</noinclude>

becomes:

<includeonly></includeonly><noinclude></noinclude>
[[Category:C]]

In other words, it completely removed category A, and when renaming category B, placed the new category tag outside the noinclude tags.

This wrecked a complicated category structure.

$ python version.py
Pywikipedia [http] trunk/pywikipedia (r6088, Nov 12 2008, 11:19:15)
Python 2.4.3 (#1, May 24 2008, 13:57:05) 
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)]


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

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



More information about the Pywikipedia-l mailing list