Only you can help us build a free scout media repository!
Please create an account to start uploading your images now.

ScoutMedia:Bot configuration

From ScoutMedia, the free scout media repository
Jump to: navigation, search

Here is the text of the configuration files which have to be used with the bots based on Python Wikipediabot Framework used on the ScoutWiki Network wikis.

The files can easily be changed to fit any new ScoutWiki whose member would like to use a bot on. The scripts work on the Spanish language "WikiRoca" too.

user-config.py

family                 =  'scoutwiki'
mylang                 =  'fr' #Put here the code of the main language you will use your bot on ; here it's fr for French.

usernames['scoutwiki']['fr'] =  'French name of the Bot'
usernames['scoutwiki']['fi'] =  'Finnish name of the Bot'
usernames['scoutwiki']['de'] =  'German (PfadiWiki) name of the Bot'

When using login.py, the -lang:XX option has to be used :

  • ~$ python login.py -lang:fr for loging in on Scoutopedia
  • ~$ python login.py -lang:fi for loging in on PartioWiki
  • ~$ python login.py -lang:de for loging in on Pfadiwiki

And do the same lines for every wiki you plan to use your bot on.

When using interwiki.py, the same option is used to tell the bot on which wiki he's got to work first, he'll then check all the pages on that wiki, and after that, if needed, modify the linked pages on the other wiki to have those linked to the first. If this option is not used, the bot will use its main language as defined by mylang = 'xx'.

Of course, the bot has to be loged on each wiki you want it to be able to write on ...

scoutwiki_family.py

This script has to be placed in the /families/ directory of your bot.

<source lang="python">

  1. -*- coding: utf-8 -*-

import urllib import family, config

class Family(family.Family):

   def __init__(self):
       family.Family.__init__(self)
       self.name = 'scoutwiki'

       self.langs = {
           'ar': 'ar.scoutwiki.org',
           'cs': 'cs.scoutwiki.org',
           'da': 'da.scoutwiki.org',
           'de': 'de.scoutwiki.org',
           'en': 'en.scoutwiki.org',
           'eo': 'eo.scoutwiki.org',
           'es': 'wiki.larocadelconsejo.net',
           'fi': 'fi.scoutwiki.org',
           'fr': 'fr.scoutwiki.org',
           'it': 'it.scoutwiki.org',
           'nl': 'nl.scoutwiki.org',
           'pt': 'pt.scoutwiki.org',
           'sv': 'sv.scoutwiki.org',
           'uk': 'uk.scoutwiki.org',
           'asso': 'asso.scoutwiki.org',
           'scoutmedia': 'media.scoutwiki.org',
       }

       self.namespaces[4] = {
           '_default': [u'ScoutWiki', self.namespaces[4]['_default']],
           'ar': u'ScoutWiki',
           'cs': u'SkautWiki',
           'da': u'SpejderWiki',
           'de': u'Pfadiwiki',
           'en': u'ScoutWiki',
           'eo': u'SkoltVikio',
           'es': u'WikiRoca',
           'fi': u'PartioWiki',
           'fr': u'Scoutopedia',
           'it': u'ScoutWiki',
           'ja': u'ボーイスカウトガイド',
           'nl': u'Scoutpedia.nl',
           'pt': u'ScoutWiki',
           'sv': u'ScoutWiki',
           'uk': u'ScoutWiki',
           'asso': u'ScoutWiki Network',
           'scoutmedia': u'ScoutMedia',
       }

       self.namespaces[5] = {
           '_default': [u'ScoutWiki talk', self.namespaces[5]['_default']],
           'ar': u'نقاش ScoutWiki',
           'cs': u'Diskuse k SkautWiki',
           'da': u'SpejderWiki diskussion',
           'de': u'Pfadiwiki Diskussion',
           'en': u'ScoutWiki talk',
           'eo': u'SkoltVikio-Diskuto',
           'es': u'WikiRoca Discusión',
           'fi': u'Keskustelu PartioWikistä',
           'fr': u'Discussion Scoutopedia',
           'it': u'Discussioni ScoutWiki',
           'ja': u'ボーイスカウトガイド‐ノート',
           'nl': u'Overleg Scoutpedia.nl',
           'pt': u'ScoutWiki Discussão',
           'sv': u'ScoutWikidiskussion',
           'uk': u'Обговорення ScoutWiki',
           'asso': u'ScoutWiki Network talk',
           'scoutmedia': u'ScoutMedia talk',
       }
       self.namespaces[9] = {
          '_default': [u'MediaWiki talk', self.namespaces[9]['_default']],
          'ar': u'نقاش ميدياويكي',
          'cs': u'Diskuse k MediaWiki',
          'da': u'MediaWiki diskussion', 
          'de': u'MediaWiki Diskussion', 
          'eo': u'MediaWiki-Diskuto',
          'fi': u'Keskustelu järjestelmäviestistä',
          'fr': u'Discussion MediaWiki',
          'it': u'Discussioni MediaWiki',
          'nl': u'Overleg MediaWiki',
          'pt': u'MediaWiki Discussão',
          'sv': u'MediaWiki-diskussion',
          'uk': u'Обговорення MediaWiki',
       }
       self.namespaces[13] = {
           '_default': [u'Help talk', self.namespaces[13]['_default']],
           'ar': u'نقاش المساعدة',
           'cs': u'Diskuse k nápovědě',
           'da': u'Hjælp diskussion', 
           'de': u'Hilfe Diskussion', 
           'eo': u'Helpo-Diskuto', 
           'fi': u'Keskustelu ohjeesta',
           'fr': u'Discussion aide',
           'it': u'Discussioni aiuto',
           'nl': u'Overleg help',
           'pt': u'Ajuda Discussão',
           'sv': u'Hjälpdiskussion',
           'uk': u'Обговорення довідки',
       }
        
       self.namespaces[100] = {
           'da':u'Portal',
           'fi':u'Lodju',
           'fr':u'Portail',
           'en':u'Portal',
           'it':u'Portale',
           'nl':u'Portaal',
       }

       self.namespaces[101] = {
           'da':u'Portaldiskussion',
           'fi':u'Keskustelu lodjusta',
           'fr':u'Discussion Portail',
           'en':u'Portal Talk',
           'it':u'Discussioni portale',
           'nl':u'Overleg portaal',
       }

       self.namespaces[102] = {
           'en':u'Workforce',
           'fr':u'Projet',
           'nl':u'Eigenschap'
       }

       self.namespaces[103] = {
           'en':u'Workforce Talk',
           'fr':u'Discussion Projet',
           'nl':u'Overleg eigenschap'
       }
       self.namespaces[106] = {
           'nl':u'Formulier',
       }
       self.namespaces[107] = {
           'nl':u'Overleg formulier',
       }
       self.namespaces[108] = {
           'nl':u'Concept',
       }
       self.namespaces[109] = {
           'nl':u'Overleg concept',
       }
       self.namespaces[420] = {
        #   '_default': u'Layer',
           'fr':u'Layer',
           'it':u'Layer',
           'nl':u'Layer',
       }
       self.namespaces[421] = {
        #   '_default': u'Layer  talk',
           'fr':u'Layer talk',
           'it':u'Layer talk',
           'nl':u'Layer talk',
       }

       self.disambiguationTemplates = {
           '_default': [u'Disambig'],
           'it':  [u'Disambigua'],
       }

       self.disambcatname = {
           'it':  u'Disambigua',
       }

       self.alphabetic_revised = [
           'ar', 'cs', 'da', 'de', 'en', 'eo', 'es', 'fr', 'fi',
           'it', 'ja', 'nl', 'pt', 'sv','uk', 'asso', 'media',
       ]

   def version(self, code):
       return '1.18.0'

   def shared_image_repository(self, code):
       return ('scoutmedia', 'scoutmedia')
   def scriptpath(self, code):
       return 
   def path(self, code):
       return '/index.php'         

</source>

Special ready made bots