
__version__ = '$Id$'

from pywikibot import family


# The Wikimedia Commons family
class Family(family.WikimediaFamily):
    def __init__(self):
        super(Family, self).__init__()
        self.name = 'commons'
        self.langs = {
            'commons': 'commons.wikimedia.org',
        }

        self.interwiki_forward = 'wikipedia'

        self.category_redirect_templates = {
            'commons': (u'Category redirect',
                        u'Categoryredirect',
                        u'Synonym taxon category redirect',
                        u'Invalid taxon category redirect',
                        u'Monotypic taxon category redirect',
                        u'See cat',
                        u'Seecat',
                        u'See category',
                        u'Catredirect',
                        u'Cat redirect',
                        u'Cat-red',
                        u'Catredir',
                        u'Redirect category'),
        }

        self.disambcatname = {
            'commons':  u'Disambiguation'
        }

    def ssl_pathprefix(self, code):
        return "/wikipedia/commons"


__version__ = '$Id$'

from pywikibot import family


# The Wikimedia Commons family
class Family(family.WikimediaFamily):
    def __init__(self):
        super(Family, self).__init__()
        self.name = 'commons'
        self.langs = {
            'commons': 'commons.wikimedia.org',
        }

        self.interwiki_forward = 'wikipedia'

        self.category_redirect_templates = {
            'commons': (u'Category redirect',
                        u'Categoryredirect',
                        u'Synonym taxon category redirect',
                        u'Invalid taxon category redirect',
                        u'Monotypic taxon category redirect',
                        u'See cat',
                        u'Seecat',
                        u'See category',
                        u'Catredirect',
                        u'Cat redirect',
                        u'Cat-red',
                        u'Catredir',
                        u'Redirect category'),
        }

        self.disambcatname = {
            'commons':  u'Disambiguation'
        }

    def ssl_pathprefix(self, code):
        return "/wikipedia/commons"

    def shared_data_repository(self, code, transcluded=False):
        return ('wikidata', 'wikidata')

Enable Wikidata for Wikimedia Commons
Enable Wikidata for Wikimedia Commons

Change-Id: Ibc8734f65dcd97dc7af9674efe8655fe01dc61d3

  
  __version__ = '$Id$'
  
  from pywikibot import family
  
  
  # The Wikimedia Commons family
  class Family(family.WikimediaFamily):
      def __init__(self):
          super(Family, self).__init__()
          self.name = 'commons'
          self.langs = {
              'commons': 'commons.wikimedia.org',
          }
  
          self.interwiki_forward = 'wikipedia'
  
          self.category_redirect_templates = {
              'commons': (u'Category redirect',
                          u'Categoryredirect',
                          u'Synonym taxon category redirect',
                          u'Invalid taxon category redirect',
                          u'Monotypic taxon category redirect',
                          u'See cat',
                          u'Seecat',
                          u'See category',
                          u'Catredirect',
                          u'Cat redirect',
                          u'Cat-red',
                          u'Catredir',
                          u'Redirect category'),
          }
  
          self.disambcatname = {
              'commons':  u'Disambiguation'
          }
  
      def ssl_pathprefix(self, code):
          return "/wikipedia/commons"
  
+     def shared_data_repository(self, code, transcluded=False):
+         return ('wikidata', 'wikidata')
+ 
Enable Wikidata for Wikimedia Commons
## Code Before:

__version__ = '$Id$'

from pywikibot import family


# The Wikimedia Commons family
class Family(family.WikimediaFamily):
    def __init__(self):
        super(Family, self).__init__()
        self.name = 'commons'
        self.langs = {
            'commons': 'commons.wikimedia.org',
        }

        self.interwiki_forward = 'wikipedia'

        self.category_redirect_templates = {
            'commons': (u'Category redirect',
                        u'Categoryredirect',
                        u'Synonym taxon category redirect',
                        u'Invalid taxon category redirect',
                        u'Monotypic taxon category redirect',
                        u'See cat',
                        u'Seecat',
                        u'See category',
                        u'Catredirect',
                        u'Cat redirect',
                        u'Cat-red',
                        u'Catredir',
                        u'Redirect category'),
        }

        self.disambcatname = {
            'commons':  u'Disambiguation'
        }

    def ssl_pathprefix(self, code):
        return "/wikipedia/commons"

## Instruction:
Enable Wikidata for Wikimedia Commons
## Code After:

__version__ = '$Id$'

from pywikibot import family


# The Wikimedia Commons family
class Family(family.WikimediaFamily):
    def __init__(self):
        super(Family, self).__init__()
        self.name = 'commons'
        self.langs = {
            'commons': 'commons.wikimedia.org',
        }

        self.interwiki_forward = 'wikipedia'

        self.category_redirect_templates = {
            'commons': (u'Category redirect',
                        u'Categoryredirect',
                        u'Synonym taxon category redirect',
                        u'Invalid taxon category redirect',
                        u'Monotypic taxon category redirect',
                        u'See cat',
                        u'Seecat',
                        u'See category',
                        u'Catredirect',
                        u'Cat redirect',
                        u'Cat-red',
                        u'Catredir',
                        u'Redirect category'),
        }

        self.disambcatname = {
            'commons':  u'Disambiguation'
        }

    def ssl_pathprefix(self, code):
        return "/wikipedia/commons"

    def shared_data_repository(self, code, transcluded=False):
        return ('wikidata', 'wikidata')
