Last modified: 2014-09-02 01:09:29 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1212/ Reported by: mystou Created on: 2010-07-15 09:38:52 Subject: commonscat.py on fr.wp Original description: Hi, On French Wikipedia, we use \{\{Autres projets|commons=PAGE\_NAME|wiktionary=PAGE\_NAME\}\}, can you update commonscat.py : \* Convert old \{\{Commonscat|PAGE\_NAME\}\} to new \{\{Autres projets|commons=PAGE\_NAME\}\} or to update an existing \{\{autres projets\}\} \* When \{\{Commonscat\}\} and \{\{Autres projets|commons=PAGE\_NAME\}\} exist on a page, remove the first and update the second. Thanks, ====== $ python version.py Pywikipedia \[http\] trunk/pywikipedia \(r8356, 2010/07/13, 18:25:51\) Python 2.6.5+ \(release26-maint, Jul 6 2010, 14:48:45\) \[GCC 4.4.4\] config-settings: use\_api = True use\_api\_login = True
If we do this properly this could also be used for the itwp. The updating and replacing should just be done with replace.py once, adding conversions to commonscat.py might make it overly complicated.
This change must be limited, for the french WIkipedia, to mainspace. On other namespaces we use Commonscat. Not that on mainspace this script is not useable, because the template must, at least, preceed ''palettes'' and ''portails''
AFAIK commonscat doesn't have a ns identifier to use a template in certain namespace and use another one otherwise, but it's a good idea to implement it