missingnotice: Implement treat_redfam
For each redfam, we need to check weather related redundance discussion exists and if there are missing notices. For those redfams return links to discussion and articles missing notice. Issue #64 (#64)
This commit is contained in:
@@ -49,7 +49,32 @@ ON `cl_from` = `page_id`
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def run( self ):
|
def run( self ):
|
||||||
print(type(self).get_categorized_articles() )
|
pass
|
||||||
|
|
||||||
|
def treat_open_redfam( self, redfam ):
|
||||||
|
"""
|
||||||
|
Works on current open redfam
|
||||||
|
|
||||||
|
@param redfam Redfam to work on
|
||||||
|
@type redfam.RedFamWorker
|
||||||
|
|
||||||
|
@returns Tuple of disclink and list of articles missing notice or None
|
||||||
|
@rtype ( str, list(str*) ) or None
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Check if related disc section exist
|
||||||
|
if not redfam.disc_section_exists():
|
||||||
|
return None
|
||||||
|
|
||||||
|
# Get links for articles without notice
|
||||||
|
links = self.treat_articles( redfam.article_generator(
|
||||||
|
filter_existing=True, filter_redirects=True ) )
|
||||||
|
|
||||||
|
# No articles without notice
|
||||||
|
if not links:
|
||||||
|
return None
|
||||||
|
|
||||||
|
return ( redfam.get_disc_link(as_link=True), links )
|
||||||
|
|
||||||
def treat_articles(self, articles):
|
def treat_articles(self, articles):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user