The center for all Wikitravel images!

User:Tatatabot/Scripts/pywikipedia/setup

From Wikitravel Shared
Jump to: navigation, search

To align with Wikitravel's script policy, you need to modify an original script of Python Wikipedia Robot Framework.


Download PyWikipediaBot[edit]

Download PyWikipediaBot revision 7296 or later from svn repository.

~$ svn checkout http://svn.wikimedia.org/svnroot/pywikipedia/trunk/pywikipedia/ pywikipedia

Sometimes latest revision is unstable. When the latest doesn't work, please download revision 7296 or revision 7314 by specifing revision number; NNN.

~$ svn checkout -r NNN http://svn.wikimedia.org/svnroot/pywikipedia/trunk/pywikipedia/ pywikipedia

  • A patch file to add Korean version for pywikipedia revision 7311 is here.

Modify family.py[edit]

Comment out meatball's line where code is setting "self.known_families" within "__init__" of "class Family".


            'mbtest':            'mbtest',
#            'meatball':          'meatball',
            'mediazilla':        'mediazilla',

Comment out world66's line where code is setting "self.known_families" within "__init__" of "class Family".


            'wookieepedia':     'wookieepedia',
#            'world66':          'world66',
            'wowwiki':          'wowwiki',

If you don't comment out meatball and world66, interwiki.py will remove links to meatball and world66.

Creat user-config.py[edit]

When you setup your bot for the first time, you need to creat a file "user-config.py" in "pywikipedia" directory.


mylang = 'en'
family = 'wikitravel'
usernames['wikitravel']['en'] = u'USERNAME OF YOUR BOT'
put_throttle = 60

If you get bot flags on more than one language version of Wikitravel, you can also add several other usernames lines like this.

Variants

Actions

In other languages