The ScoutWiki Network server was upgraded on November 20th, 2019. The maintenance is now over. Please inform us in Slack or via email if you encounter any unexpected errors – it's possible the upgrade has missed something. Thanks and happy scoutwiki'ng!

Bot configuration

From ScoutWiki Network
Revision as of 16:19, 8 December 2006 by Akela NDE (talk | contribs)
Jump to navigation Jump to search

Here are the text of the configuration files which have to be used on the bots used on the ScoutWiki network scouting wikis.

Those scripts are now ready only for use on PartioWiki and Scoutopedia, but can easily be changed to fit any new Scouting Wiki whose member would like to use a bot on.

family                 =  'scoutwiki'
mylang                 =  'fr'
mylang                 =  'fi'
usernames['scoutwiki']['fr'] =  'French name of the Bot'
usernames['scoutwiki']['fi'] =  'Finnish name of the Bot'

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

  • ~$ python -lang:fr for loging in on Scoutopedia, then
  • ~$ python -lang:fi for loging in on PartioWiki.

When using, 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.

Of course, the bot has to be loged on both wikis to be able to write on them ...

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

# -*- coding: utf-8  -*-
import family

# ScoutWiki, the international network of scouting wikis.
# ScoutWiki, le réseau international de wikis scouts.

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

        self.langs = {
            'fi':'', # PartioWiki
            'fr':'', # Scoutopedia

        # Most namespaces are inherited from family.Family.

        self.namespaces[4] = {
            '_default': u'scoutwiki',
            'fi': u'PartioWiki',
            'fr': u'Scoutopedia'
        self.namespaces[5] = {
            '_default': u'Talk about scoutwiki',
            'fi': u'Keskustelu PartioWikista',
            'fr': u'Discussion Scoutopedia',

        #custom namespaces
        self.namespaces[100] = {
            '_default':u'Geocaches',       #Not really geocaches, working with hints, not coordinates
        self.namespaces[101] = {
            '_default':u'Geocaches talk',
            'fi':u'Keskustelu lodjusta'

    def version(self, code):
        return "1.5.6"

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