[Pywikipedia-l] [Pywikipedia-svn] SVN: [9294] trunk/pywikipedia/create_categories.py

Bináris wikiposta at gmail.com
Mon Jun 13 13:39:31 UTC 2011


This is a nice script, I like the idea, thanks. Some remarks:

2011/6/12 <multichill at svn.wikimedia.org>

> http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9294
> +-alway          (not implemented yet) Don't ask, just do the edit.
>
A small typo in always.


> +__version__ = '$Id: create_categories.py 9042 2011-03-13 10:14:47Z xqt $'
>
Must have remained in accidentally, as well as a long series of unused
imports.


> +    newpage = pywikibot.Page(pywikibot.getSite(u'commons', u'commons'),
> +                                 u'Category:' + basename + u' ' + title)
>
At this point, it seems to work only for Commons, and not using the -lang
and -family parameters given in the example.


> +    newtext = u''
> +    newtext += u'[[Category:' + parent + u'|' + title + u']]\n'
>
While "Category" works for all wikiprojects as default,
site.namespace(14)would be more appropriate for use outside of Commons
(preventing the bot
owner of getting angry messages pointing out the advantages of mother
tongue).


> +    newtext += u'[[Category:' + title + u']]\n'
>
This should be optional. In other wikis it is not sure that all the topics
have an own category; as a matter of fact, I looked at
User:Multichill/Wallonia in Commons that has also a few red links.


-- 
Bináris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wikimedia.org/pipermail/pywikipedia-l/attachments/20110613/8f3ca4f6/attachment.htm 


More information about the Pywikipedia-l mailing list