Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/222762

Change subject: Ask for showing GlobalHelp options
......................................................................

Ask for showing GlobalHelp options

Many scripts have a long documentation to show all the options supported.
Now ask whether the GlobalHelp options should be printed too.

Change-Id: I77bd3b9d214e5ecb866602bf7111375dc4cba31f
---
M pywikibot/bot.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/62/222762/1

diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 489ed80..f0abee0 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -1160,7 +1160,7 @@
         except NameError:
             module_name = "no_module"
 
-    globalHelp = u'''
+    globalHelp = '''
 Global arguments available for all bots:
 
 -dir:PATH         Read the bot's configuration data from directory given by
@@ -1230,7 +1230,8 @@
         if module_name:
             pywikibot.stdout(u'Sorry, no help available for %s' % module_name)
         pywikibot.log('showHelp:', exc_info=True)
-    pywikibot.stdout(globalHelp)
+    if input_yn('Show global options?', default=False, automatic_quit=False):
+        pywikibot.stdout(globalHelp)
 
 
 def writeToCommandLogFile():

-- 
To view, visit https://gerrit.wikimedia.org/r/222762
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77bd3b9d214e5ecb866602bf7111375dc4cba31f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to