Add additional possibilities to detect wether a red_page is an archive or not
This commit is contained in:
@@ -58,7 +58,7 @@ class RED_PAGE:
|
|||||||
"""
|
"""
|
||||||
Detects wether current page is an archive of discussions
|
Detects wether current page is an archive of discussions
|
||||||
"""
|
"""
|
||||||
if self._archive or ( u"/Archiv" in self.page.title() ):
|
if self._archive or ( u"/Archiv" in self.page.title() ) or ( "{{Archiv}}" in self.page.text ) or ( "{{Archiv|" in self.page.text ):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
@@ -91,7 +91,6 @@ class RED_PAGE:
|
|||||||
last_fam = i
|
last_fam = i
|
||||||
# Save heading
|
# Save heading
|
||||||
fam_heading = line
|
fam_heading = line
|
||||||
pywikibot.output( fam_heading )
|
|
||||||
|
|
||||||
# Defined (re)initialisation of dates
|
# Defined (re)initialisation of dates
|
||||||
beginning = None
|
beginning = None
|
||||||
@@ -124,8 +123,8 @@ class RED_PAGE:
|
|||||||
j -= 1
|
j -= 1
|
||||||
ending = RED_FAM_PARSER.is_ending2( text_lines[ j ] )
|
ending = RED_FAM_PARSER.is_ending2( text_lines[ j ] )
|
||||||
|
|
||||||
|
|
||||||
red_fam = RED_FAM_PARSER( fam_heading, self.page._pageid, self.is_archive(), beginning, ending )
|
red_fam = RED_FAM_PARSER( fam_heading, self.page._pageid, self.is_archive(), beginning, ending )
|
||||||
pywikibot.output( red_fam )
|
|
||||||
|
|
||||||
# Increment line counter
|
# Increment line counter
|
||||||
i += 1
|
i += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user