SummaryPage-Module: Implement method for returning new page text if editing is needed

This commit is contained in:
2015-11-13 11:03:42 +01:00
parent fc96bb5b6c
commit f003b20d65

View File

@@ -64,6 +64,19 @@ class SummaryPage():
# recreation of template object and reassignment won't be reflected
self.wikicode.replace( entry, summarypageentry.new_entry.template )
def get_new_text( self ):
"""
If writing page is needed, return new text, otherwise false
"""
# Get information wether writing is needed from class attribute
if SummaryPageEntry.write_needed:
# Convert wikicode back to string and return
return str( self.wikicode )
return False
class SummaryPageEntry():
"""