Example #1
0
	def categories(self, generator = True):
		self.site.require(1, 11)
		if generator:
			return listing.PagePropertyGenerator(self, 'categories', 'cl')
		else:
			# TODO: return sortkey if wanted
			return listing.PageProperty(self, 'categories', 'cl', return_values = 'title')
Example #2
0
	def templates(self, namespace = None, generator = True):
		self.site.require(1, 8)
		kwargs = dict(listing.List.generate_kwargs('tl', namespace = namespace))
		if generator:
			return listing.PagePropertyGenerator(self, 'templates', 'tl')
		else:
			return listing.PageProperty(self, 'templates', 'tl', return_values = 'title')
Example #3
0
    def revisions(self,
                  startid=None,
                  endid=None,
                  start=None,
                  end=None,
                  dir='older',
                  user=None,
                  excludeuser=None,
                  limit=50,
                  prop='ids|timestamp|flags|comment|user',
                  expandtemplates=False):
        self.site.require(1, 8)
        kwargs = dict(
            listing.List.generate_kwargs('rv',
                                         startid=startid,
                                         endid=endid,
                                         start=start,
                                         end=end,
                                         user=user,
                                         excludeuser=excludeuser))
        kwargs['rvdir'] = dir
        kwargs['rvprop'] = prop
        if expandtemplates: kwargs['rvexpandtemplates'] = '1'

        return listing.PageProperty(self,
                                    'revisions',
                                    'rv',
                                    limit=limit,
                                    **kwargs)
Example #4
0
 def images(self, generator=True):
     if generator:
         return listing.PagePropertyGenerator(self, 'images', '')
     else:
         return listing.PageProperty(self,
                                     'images',
                                     '',
                                     return_values='title')
Example #5
0
    def links(self, namespace=None, generator=True, redirects=False):
        prefix = listing.List.get_prefix('pl', generator)
        kwargs = dict(listing.List.generate_kwargs(prefix,
                                                   namespace=namespace))

        if redirects:
            kwargs['redirects'] = '1'
        if generator:
            return listing.PagePropertyGenerator(self, 'links', 'pl', **kwargs)
        else:
            return listing.PageProperty(self,
                                        'links',
                                        'pl',
                                        return_values='title',
                                        **kwargs)
Example #6
0
	def imagehistory(self):
		return listing.PageProperty(self, 'imageinfo', 'ii', 
			iiprop = compatibility.iiprop(self.site.version))
Example #7
0
	def langlinks(self):
		self.site.require(1, 9)
		return listing.PageProperty(self, 'langlinks', 'll', return_values = ('lang', '*'))
Example #8
0
	def extlinks(self):
		self.site.require(1, 11)
		return listing.PageProperty(self, 'extlinks', 'el', return_values = '*')
Example #9
0
 def duplicatefiles(self, limit=None):
     return listing.PageProperty(self,
                                 'duplicatefiles',
                                 'df',
                                 dflimit=limit)
Example #10
0
 def imagehistory(self):
     return listing.PageProperty(
         self,
         'imageinfo',
         'ii',
         iiprop='timestamp|user|comment|url|size|sha1|metadata|archivename')
Example #11
0
 def langlinks(self, **kwargs):
     return listing.PageProperty(self,
                                 'langlinks',
                                 'll',
                                 return_values=('lang', '*'),
                                 **kwargs)
Example #12
0
 def iwlinks(self):
     return listing.PageProperty(self,
                                 'iwlinks',
                                 'iw',
                                 return_values=('prefix', '*'))
Example #13
0
 def extlinks(self):
     return listing.PageProperty(self, 'extlinks', 'el', return_values='*')
Example #14
0
 def duplicatefiles(self, limit=None):
     self.require(1, 14)
     return listing.PageProperty(self,
                                 'duplicatefiles',
                                 'df',
                                 dflimit=limit)