Jump to content

Pywikibot/Use on non-WMF wikis: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
No edit summary
 
Produnis (talk | contribs)
No edit summary
Line 14: Line 14:
*5: u'Meta talk' })
*5: u'Meta talk' })
::'Meta talk' is the name of the talk namespace indicated in the previous point.
::'Meta talk' is the name of the talk namespace indicated in the previous point.

see [[myproject_family.py]] for another example...


===Wikitravel===
===Wikitravel===

Revision as of 12:50, 3 March 2005

The pywikipedia bot may be used to do all kind of things that are important for the maintenance of a mediawiki project. When this software is to be used outside of the wikimedia projects, some configuration needs to be done.

Example

The meta_family.py is the "family" definition for a project that is internally only one database. Therefore it is most likely the one to copy for an external project. The name of the new file must be "YourProject"_family.py where "YourProject" is the name of your project. When you open this file with a text-editor, there are a few things you need to change:

  • name = 'meta'
'meta' must be "YourProject" and must be the same as the language you indicate in user-config.py.
  • self._addlang('meta',
'meta' must be the same as the language you indicate in user-config.py.
  • location = 'meta.wikimedia.org',
meta.wikimedia.org must be the URL that is used for your project.
  • namespaces = { 4: u'Meta',
'Meta' is the namespace of your project typically it is the name of your project
  • 5: u'Meta talk' })
'Meta talk' is the name of the talk namespace indicated in the previous point.

see myproject_family.py for another example...

Wikitravel

  • For the Wikitravel projects (non wikimedia projects) there is already a family created. It is an example with a different way of naming projects.