@@ -51,6 +51,28 @@ ON `cl_from` = `page_id`
|
||||
def run( self ):
|
||||
print(type(self).get_categorized_articles() )
|
||||
|
||||
def treat_articles(self, articles):
|
||||
"""
|
||||
Iterates over given articles and checks weather them are included in
|
||||
self.categorized_articles (contain the notice)
|
||||
|
||||
@param articles Articles to check
|
||||
@type articles iterable of pywikibot.page() objects
|
||||
|
||||
@returns Possibly empty list of wikitext links ("[[article]]")
|
||||
@rtype list
|
||||
"""
|
||||
links = list()
|
||||
|
||||
for article in articles:
|
||||
|
||||
if article.title(underscore=True, with_section=False ) not in \
|
||||
self.categorized_articles:
|
||||
|
||||
links.append( article.title(as_link=True, textlink=True) )
|
||||
|
||||
return links
|
||||
|
||||
@classmethod
|
||||
def get_categorized_articles( cls ):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user