This is a nice script, I like the idea, thanks. Some remarks:
+-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
+ newpage =
+ u'Category:' + basename + u' ' +
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
+ newtext += u'[[Category:' + title +
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.