diff --git a/bots/markpages.py b/bots/markpages.py index 8ace79a..7637993 100644 --- a/bots/markpages.py +++ b/bots/markpages.py @@ -224,6 +224,9 @@ class MarkPagesBot( CurrentPageBot ): # sets 'current_page' on each treat() else: self.current_wikicode.insert( 0, self.disc_notice ) + # To have it in its own line we need to add a linbreak after it + self.current_wikicode.insert_after(self.disc_notice, "\n" ) + # Notice was added return True diff --git a/red.py b/red.py index 81388d6..f4be812 100644 --- a/red.py +++ b/red.py @@ -26,6 +26,7 @@ Wrapper script to invoke all redundances bot tasks """ import os +import locale import pywikibot @@ -92,6 +93,10 @@ def main(*args): @type args: list of unicode """ + # Make sure locale is set to 'de_DE.UTF-8' to prevent problems + # with wrong month abreviations in strptime + locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8') + # Process global arguments to determine desired site local_args = pywikibot.handle_args(args)