http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11034
Revision: 11034 Author: xqt Date: 2013-02-08 12:20:08 +0000 (Fri, 08 Feb 2013) Log Message: ----------- use super method for the parent class like on all wikimedia family files. This call is independent of the actual class type
Modified Paths: -------------- trunk/pywikipedia/families/README-family.txt
Modified: trunk/pywikipedia/families/README-family.txt =================================================================== --- trunk/pywikipedia/families/README-family.txt 2013-02-08 12:06:10 UTC (rev 11033) +++ trunk/pywikipedia/families/README-family.txt 2013-02-08 12:20:08 UTC (rev 11034) @@ -1,6 +1,6 @@ How to create a new family file to add a new wiki to the bot framework.
-(c) 2008-2011, the Pywikipediabot team +(c) 2008-2013, the Pywikipediabot team
First of all, run generate_family_file.py, and see if this works. If it doesn't, please read the text below and check the example. @@ -26,17 +26,17 @@
== COPY HERE ==
-# -*- coding: utf-8 -*- # REQUIRED -import config, family, urllib # REQUIRED +# -*- coding: utf-8 -*- # REQUIRED +import config, family, urllib # REQUIRED
-class Family(family.Family): # REQUIRED - def __init__(self): # REQUIRED - family.Family.__init__(self) # REQUIRED - self.name = 'WIKINAME' # REQUIRED; replace with actual name +class Family(family.Family): # REQUIRED + def __init__(self): # REQUIRED + super(Family, self).__init__() # REQUIRED + self.name = 'WIKINAME' # REQUIRED; replace with actual name
- self.langs = { # REQUIRED - 'en': 'www.example.com', # Include one line for each wiki in family - 'fr': 'www.example.fr', # in the format 'code': 'hostname', + self.langs = { # REQUIRED + 'en': 'www.example.com', # Include one line for each wiki in family + 'fr': 'www.example.fr', # in the format 'code': 'hostname', }
# Translation used on all wikis for the different namespaces.