jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/375606 )
Change subject: APISite.logevents: Do not ignore the namespace if it is 0
......................................................................
APISite.logevents: Do not ignore the namespace if it is 0
Bug: T174875
Change-Id: Icd3ea445a08fb88c104663952c4d9afd2a520739
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
Zoranzoki21: Looks good to me, but someone else must approve
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 67a782e..4a4dba6 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -4544,7 +4544,7 @@
legen.request["leend"] = end
if reverse:
legen.request["ledir"] = "newer"
- if namespace:
+ if namespace is not None:
legen.request["lenamespace"] = namespace
if tag:
# Supported in version 1.16+; earlier sites will cause APIError
--
To view, visit https://gerrit.wikimedia.org/r/375606
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icd3ea445a08fb88c104663952c4d9afd2a520739
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <dori.gord(a)orion.rs>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/362410 )
Change subject: [DOC] Differentiate between generators and filters in -help
......................................................................
[DOC] Differentiate between generators and filters in -help
- also sort filter parameters
Bug: T167581
Change-Id: I7054328600292f3306b000d61151d32fa7293f08
---
M pywikibot/bot.py
M pywikibot/pagegenerators.py
2 files changed, 59 insertions(+), 51 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 500fb5d..baa57ac 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -995,7 +995,9 @@
module_name = "no_module"
globalHelp = u'''
-Global arguments available for all bots:
+GLOBAL OPTIONS
+==============
+(Global arguments available for all bots)
-dir:PATH Read the bot's configuration data from directory given by
PATH, instead of from the default directory.
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 32c1c22..f775d54 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -66,9 +66,8 @@
# a generator
parameterHelp = """\
-
--catfilter Filter the page generator to only yield pages in the
- specified category. See -cat for argument format.
+GENERATOR OPTIONS
+=================
-cat Work on all pages which are in a specific category.
Argument can also be given as "-cat:categoryname" or
@@ -144,37 +143,12 @@
In some cases it must be written as -logevents:"move,Usr,20"
--namespaces Filter the page generator to only yield pages in the
--namespace specified namespaces. Separate multiple namespace
--ns numbers or names with commas.
- Examples:
-
- -ns:0,2,4
- -ns:Help,MediaWiki
-
- You may use a preleading "not" to exclude the namespace.
- Examples:
- -ns:not:2,3
- -ns:not:Help,File
-
- If used with -newpages/-random/-randomredirect,
- -namespace/ns must be provided before
- -newpages/-random/-randomredirect.
- If used with -recentchanges, efficiency is improved if
- -namespace/ns is provided before -recentchanges.
-
- If used with -start, -namespace/ns shall contain only one
- value.
-
-interwiki Work on the given page and all equivalent pages in other
languages. This can, for example, be used to fight
multi-site spamming.
Attention: this will cause the bot to modify
pages on several wiki sites, this is not well tested,
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.
-links Work on all pages that are linked from a certain page.
Argument can also be given as "-links:linkingpagetitle".
@@ -225,22 +199,6 @@
default value is start:!
-prefixindex Work on pages commencing with a common prefix.
-
--subpage:n Filters pages to only those that have depth n
- i.e. a depth of 0 filters out all pages that are subpages,
- and a depth of 1 filters out all pages that are subpages of
- subpages.
-
--titleregex A regular expression that needs to match the article title
- otherwise the page won't be returned.
- Multiple -titleregex:regexpr can be provided and the page
- will be returned if title is matched by any of the regexpr
- provided.
- Case insensitive regular expressions will be used and
- dot matches any character.
-
--titleregexnot Like -titleregex, but return the page only if the regular
- expression does not match.
-transcludes Work on all pages that use a certain template.
Argument can also be given as "-transcludes:Title".
@@ -315,6 +273,13 @@
"-pageid:pageid1,pageid2,." or "-pageid:'pageid1|pageid2|..'"
and supplied multiple times for multiple pages.
+
+FILTER OPTIONS
+==============
+
+-catfilter Filter the page generator to only yield pages in the
+ specified category. See -cat generator for argument format.
+
-grep A regular expression that needs to match the article
otherwise the page won't be returned.
Multiple -grep:regexpr can be provided and the page will
@@ -323,11 +288,32 @@
Case insensitive regular expressions will be used and
dot matches any character, including a newline.
--ql Filter pages based on page quality.
- This is only applicable if contentmodel equals
- 'proofread-page', otherwise has no effects.
- Valid values are in range 0-4.
- Multiple values can be comma-separated.
+-intersect Work on the intersection of all the provided generators.
+
+-limit:n When used with any other argument that specifies a set
+ of pages, work on no more than n pages in total.
+
+-namespaces Filter the page generator to only yield pages in the
+-namespace specified namespaces. Separate multiple namespace
+-ns numbers or names with commas.
+ Examples:
+
+ -ns:0,2,4
+ -ns:Help,MediaWiki
+
+ You may use a preleading "not" to exclude the namespace.
+ Examples:
+ -ns:not:2,3
+ -ns:not:Help,File
+
+ If used with -newpages/-random/-randomredirect generators,
+ -namespace/ns must be provided before
+ -newpages/-random/-randomredirect.
+ If used with -recentchanges generator, efficiency is
+ improved if -namespace/ns is provided before -recentchanges.
+
+ If used with -start generator, -namespace/ns shall contain
+ only one value.
-onlyif A claim the page needs to contain, otherwise the item won't
be returned.
@@ -347,7 +333,27 @@
be returned.
For usage and examples, see -onlyif above.
--intersect Work on the intersection of all the provided generators.
+-ql Filter pages based on page quality.
+ This is only applicable if contentmodel equals
+ 'proofread-page', otherwise has no effects.
+ Valid values are in range 0-4.
+ Multiple values can be comma-separated.
+
+-subpage:n Filters pages to only those that have depth n
+ i.e. a depth of 0 filters out all pages that are subpages,
+ and a depth of 1 filters out all pages that are subpages of
+ subpages.
+
+-titleregex A regular expression that needs to match the article title
+ otherwise the page won't be returned.
+ Multiple -titleregex:regexpr can be provided and the page
+ will be returned if title is matched by any of the regexpr
+ provided.
+ Case insensitive regular expressions will be used and
+ dot matches any character.
+
+-titleregexnot Like -titleregex, but return the page only if the regular
+ expression does not match.
"""
docuReplacements = {'¶ms;': parameterHelp}
--
To view, visit https://gerrit.wikimedia.org/r/362410
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7054328600292f3306b000d61151d32fa7293f08
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>