Browse Source

Read Edit Summary from config

To be able to change the Edit-Summary without touching the source code
develop
Jonathan Golder 5 years ago
parent
commit
51d8bb9da9
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      charts.py

+ 8
- 2
charts.py View File

@ -94,9 +94,15 @@ class ChartsBot( ):
# Output Information
jogobot.output( "Chartsbot invoked" )
# Set the edit summary message
# Save pywikibot site object
self.site = pywikibot.Site()
self.summary = "Bot: Aktualisiere Übersichtsseite Nummer-eins-Hits"
# Define edit summary
self.summary = jogobot.config["charts"]["edit_summary"].strip()
# Make sure summary starts with "Bot:"
if not self.summary[:len("Bot:")] == "Bot:":
self.summary = "Bot: " + self.summary.strip()
# Set locale to 'de_DE.UTF-8'
locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')


Loading…
Cancel
Save