[Pywikipedia-l] [ pywikipediabot-Feature Requests-1722782 ] interwiki.py should follow category redirect templates

SourceForge.net noreply at sourceforge.net
Fri Jan 9 13:17:53 UTC 2009


Feature Requests item #1722782, was opened at 2007-05-21 11:21
Message generated for change (Comment added) made by russblau
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1722782&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
Priority: 5
Private: No
Submitted By: Byrial Ole Jensen (byrial)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki.py should follow category redirect templates

Initial Comment:
Sometimes when a category is moved, a template like [[en:template:Template:Category redirect]] (see its interwiki links for similar templates in other languages) is left at the old category page.

It would be good if interwiki.py could check for the presence of a such template and follow the redirect to the new category as given by the template argument.


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

>Comment By: Russell Blau (russblau)
Date: 2009-01-09 08:17

Message:
category_redirect.py already contains a list of category redirect
templates, although only for a few sites.  If it is desired to use this
capability in other bots, then the template lists should probably be moved
into the family files, and an is_category_redirect() method added to the
Category object in catlib.py, or alternatively to the Page object.

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

Comment By: Lars Aronsson (aronsson)
Date: 2009-01-09 06:40

Message:
I now have some code that I believe solves this. But since I'm a beginner
in Python, I'd like someone more experienced to look at my code before it
is submitted.

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

Comment By: Lars Aronsson (aronsson)
Date: 2009-01-08 19:46

Message:
The previous comment was by me. I don't know why I wasn't logged in.

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

Comment By: Nobody/Anonymous (nobody)
Date: 2009-01-08 19:43

Message:
Implementing this feature involves several steps.

First the template needs to be detected. This is similar to isDisambig()
in wikipedia.py. Perhaps that function should also require isCategory(), so
the template is only detected when used in category pages. Unfortunately,
there is no equivalent to the MediaWiki:Disambiguationspage to help us find
out what the template name is in each language, so we have to list the
template translations for each language. I think that should be manageable.

I propose the new function be called isCategoryRedirect(). Then this
function needs to be introduced where isRedirect() is used. Or perhaps
isRedirect() should call it? That would save a lot of work.

Are there some situations where it would be harmful to detect this
template? Should the use of the new function be configurable?


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

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



More information about the Pywikipedia-l mailing list