]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Add more context to the diff.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 3 Jul 2022 21:44:18 +0000 (23:44 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 3 Jul 2022 21:44:18 +0000 (23:44 +0200)
bots/sledrun_wikitext_from_json.py

index 3c1473bf43025313b242524579d9589ff1fa641a..8f38e32cda4e3783347357929b58ce0b7f6fe0cd 100644 (file)
@@ -57,7 +57,8 @@ class SledrunFromJsonBot(
             impressions = sledrun_impressions_page.title()
         text = create_sledrun_wiki(sledrun_json, map_json, impressions)
         summary = 'Rodelbahnbeschreibung aus JSON Daten aktualisiert.'
             impressions = sledrun_impressions_page.title()
         text = create_sledrun_wiki(sledrun_json, map_json, impressions)
         summary = 'Rodelbahnbeschreibung aus JSON Daten aktualisiert.'
-        self.put_current(text, summary=summary)
+        pywikibot.showDiff(self.current_page.text.strip(), text.strip(), context=2)
+        self.put_current(text, summary=summary, show_diff=False)
 
 
 def main(*args: str) -> None:
 
 
 def main(*args: str) -> None: