Browse Source

improve-output: Only show diff in interactive mode without -always flag

develop
Jonathan Golder 9 years ago
parent
commit
e932303c40
  1. 4
      chartsbot.py

4
chartsbot.py

@ -132,6 +132,10 @@ class ChartsBot( ):
"""Update the given page with new text.""" """Update the given page with new text."""
# only save if something was changed (and not just revision) # only save if something was changed (and not just revision)
if text != page.get(): if text != page.get():
# Show diff only in interactive mode
if not self.always:
# Show the title of the page we're working on. # Show the title of the page we're working on.
# Highlight the title in purple. # Highlight the title in purple.
pywikibot.output( u"\n\n>>> \03{lightpurple}%s\03{default} <<<" pywikibot.output( u"\n\n>>> \03{lightpurple}%s\03{default} <<<"

Loading…
Cancel
Save