jenkins-bot has submitted this change and it was merged.

Change subject: replace.py and pagegenerators.py help improvements
......................................................................


replace.py and pagegenerators.py help improvements

- Move documentation of fixes from replace script into fixes module.
- Remove duplicate -page argument documentation in replace script.
- Add periods where missing in pagegenerators help.
- remove ?? from -help.

Change-Id: I8a3f83c319c3847673e994a433e128b5f4161862
---
M pywikibot/fixes.py
M pywikibot/pagegenerators.py
M scripts/replace.py
3 files changed, 16 insertions(+), 18 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/fixes.py b/pywikibot/fixes.py
index 723631d..1a5fb07 100644
--- a/pywikibot/fixes.py
+++ b/pywikibot/fixes.py
@@ -1,15 +1,15 @@
 # -*- coding: utf-8  -*-
 """File containing all standard fixes."""
-
 #
 # (C) Pywikibot team, 2008-2010
 #
 # Distributed under the terms of the MIT license.
 #
 __version__ = '$Id$'
-#
 
-help = u"""
+parameter_help = u"""
+                  Currently available predefined fixes are:
+
                   * HTML        - Convert HTML tags to wiki syntax, and
                                   fix XHTML.
                   * isbn        - Fix badly formatted ISBNs.
@@ -31,9 +31,10 @@
                   * fckeditor   - Try to convert FCKeditor HTML tags to wiki
                                   syntax.
                                   
https://lists.wikimedia.org/pipermail/wikibots-l/2009-February/000290.html
-
 """
 
+__doc__ = __doc__ + parameter_help
+
 fixes = {
     # These replacements will convert HTML to wiki syntax where possible, and
     # make remaining tags XHTML compliant.
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index f2e8360..a4b5b43 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -103,7 +103,7 @@
                   so check your edits!
 
 -limit:n          When used with any other argument that specifies a set
-                  of pages, work on no more than n pages in total
+                  of pages, work on no more than n pages in total.
 
 -links            Work on all pages that are linked from a certain page.
                   Argument can also be given as "-links:linkingpagetitle".
@@ -136,7 +136,7 @@
 
 -step:n           When used with any other argument that specifies a set
                   of pages, only retrieve n pages at a time from the wiki
-                  server
+                  server.
 
 -titleregex       Work on titles that match the given regular expression.
 
@@ -157,15 +157,15 @@
                   Argument can be given as "-unwatched:n" where
                   n is the maximum number of articles to work on.
 
--usercontribs     Work on all articles that were edited by a certain user :
-                  Example : -usercontribs:DumZiBoT
+-usercontribs     Work on all articles that were edited by a certain user.
+                  (Example : -usercontribs:DumZiBoT)
 
 -weblink          Work on all articles that contain an external link to
                   a given URL; may be given as "-weblink:url"
 
 -withoutinterwiki Work on all pages that don't have interlanguage links.
                   Argument can be given as "-withoutinterwiki:n" where
-                  n is some number (??).
+                  n is the total to fetch.
 
 -mysqlquery       Takes a Mysql query string like
                   "SELECT page_namespace, page_title, FROM page
@@ -199,7 +199,8 @@
                   config.py for instructions.
 
 -page             Work on a single page. Argument can also be given as
-                  "-page:pagetitle".
+                  "-page:pagetitle", and supplied multiple times for
+                  multiple pages.
 
 -grep             A regular expression that needs to match the article
                   otherwise the page won't be returned.
diff --git a/scripts/replace.py b/scripts/replace.py
index cd9fcfb..75f76d9 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -10,15 +10,11 @@
 
 &params;
 
+Furthermore, the following command line parameters are supported:
+
 -xml              Retrieve information from a local XML dump (pages-articles
                   or pages-meta-current, see https://download.wikimedia.org).
                   Argument can also be given as "-xml:filename".
-
--page             Only edit a specific page.
-                  Argument can also be given as "-page:pagetitle". You can
-                  give this parameter multiple times to edit multiple pages.
-
-Furthermore, the following command line parameters are supported:
 
 -regex            Make replacements using regular expressions. If this argument
                   isn't given, the bot will make simple text replacements.
@@ -70,7 +66,7 @@
                   fixes.py and user-fixes.py.
                   The -regex and -nocase argument and given replacements will
                   be ignored if you use -fix.
-                  Currently available predefined fixes are:
+
 &fixes-help;
 
 -always           Don't prompt you for each replacement
@@ -143,7 +139,7 @@
 # with the parameter -help.
 docuReplacements = {
     '&params;':     pagegenerators.parameterHelp,
-    '&fixes-help;': fixes.help,
+    '&fixes-help;': fixes.parameter_help,
 }
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a3f83c319c3847673e994a433e128b5f4161862
Gerrit-PatchSet: 6
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to