missingnotice: Implement run()

The bots working sequence, using previously implemented methods to
update the list of missing notices

Issue #64 (#64)
This commit is contained in:
2018-09-18 15:42:02 +02:00
parent 4c8ba95534
commit f021a13202

View File

@@ -29,6 +29,8 @@ import pywikibot
import jogobot
from lib.redfam import RedFamWorker
class MissingNoticeBot(pywikibot.bot.Bot):
"""
@@ -47,10 +49,24 @@ ON `cl_from` = `page_id`
def __init__( self, genFactory, **kwargs ):
self.categorized_articles = list()
self.page_content = list()
super(type(self), self).__init__(**kwargs)
def run( self ):
pass
# query articles containing notice
self.categorized_articles = type(self).get_categorized_articles()
# iterate open redfams
for redfam in RedFamWorker.gen_open():
links = self.treat_open_redfam(redfam)
if links:
self.page_content.append( self.format_row( links ) )
# Update page content
self.update_page()
def treat_open_redfam( self, redfam ):
"""