Benutzer:Jerrys Bot

Aus CivWiki
Wechseln zu: Navigation, Suche
user-config.py
mylang='de'
family='civwiki'
usernames['civwiki']['civwiki']=u'Jerrys Bot'
console_encoding = 'utf-8'
families/civwiki_family.py
# -*- 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 = 'civwiki'        # REQUIRED; replace with actual name

        self.langs = {                # REQUIRED
            'civwiki': 'www.civwiki.de',  # 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.
        # Most namespaces are inherited from family.Family.
        # Check the family.py file (in main directory) to see the standard
        # namespace translations for each known language.

        # You only need to enter translations that differ from the default.
        # There are two ways of entering namespace translations.
        # 1.  If you only need to change the translation of a particular
        #     namespace for one or two languages, use this format (example):
        #self.namespaces[2]['en'] = u'Wikiuser'
        #self.namespaces[3]['en'] = u'Wikiuser talk'

        # 2.  If you need to change the translation for many languages
        #     for the same namespace number, use this format (this is common
        #     for namespaces 4 and 5, because these are usually given a
        #     unique name for each wiki) (example):
        #self.namespaces[4] = {
        #    '_default': [u'WIKINAME', self.namespaces[4]['_default']], # REQUIRED
        #    'de': 'Name des Wikis',
        #    'es': 'Nombre del wiki',
        #    'fr': 'Nom du wiki',
        #    # ETC.
        #}

        # Wikimedia wikis all use "bodyContent" as the id of the <div>
        # element that contains the actual page content; change this for
        # wikis that use something else (e.g., mozilla family)
        #self.content_id = "bodyContent"

        # On most wikis page names must start with a capital letter, but some
        # languages don't use this.  This should be a list of languages that
        # _don't_ require the first letter to be capitalized.  Example:
        # self.nocapitalize = ['foo', 'bar']

        # SETTINGS FOR WIKIS THAT USE DISAMBIGUATION PAGES:

        # Disambiguation template names in different languages; each value
        # must be a list, even if there is only one entry.  Example:
        # self.disambiguationTemplates['en'] = ['disambig', 'disambiguation']

        # The name of the category containing disambiguation
        # pages for the various languages. Only one category per language,
        # and without the namespace, so add things like:
        # self.disambcatname['en'] = "Disambiguation"

    def protocol(self, code):
        """
        Can be overridden to return 'https'. Other protocols are not supported.
        """
        return 'http'

    def scriptpath(self, code):
        """The prefix used to locate scripts on this wiki.

        This is the value displayed when you enter {{SCRIPTPATH}} on a
        wiki page (often displayed at [[Help:Variables]] if the wiki has
        copied the master help page correctly).

        The default value is the one used on Wikimedia Foundation wikis,
        but needs to be overridden in the family file for any wiki that
        uses a different value.

        """
        return '/'

    # IMPORTANT: if your wiki does not support the api.php interface,
    # you must uncomment the second line of this method:
    def apipath(self, code):
        # raise NotImplementedError, "%s wiki family does not support api.php" % self.name
        return '%s/api.php' % self.scriptpath(code)

    # Which version of MediaWiki is used? REQUIRED
    def version(self, code):
        # Replace with the actual version being run on your wiki
        return '1.16.0'

    def code2encoding(self, code):
        """Return the encoding for a specific language wiki"""
        # Most wikis nowadays use UTF-8, but change this if yours uses
        # a different encoding
        return 'utf-8'