jenkins-bot has submitted this change and it was merged.
Change subject: add -lonelypages option to pagegenerators
......................................................................
add -lonelypages option to pagegenerators
based on:
http://sourceforge.net/p/pywikipediabot/patches/559/
bug: 54561
Change-Id: I1e61afe05dec67573dda8f9c68fc9ade0de5bf7a
---
M pywikibot/pagegenerators.py
1 file changed, 9 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index c1a9aa7..9a2c6f5 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -129,13 +129,16 @@
Argument can be given as "-unusedfiles:n" where
n is the maximum number of articles to work on.
+-lonelypages Work on all articles that are not linked from any other article.
+ Argument can be given as "-lonelypages:n" where
+ n is the maximum number of articles to work on.
+
-unwatched Work on all articles that are not watched by anyone.
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
-
-weblink Work on all articles that contain an external link to
a given URL; may be given as "-weblink:url"
@@ -307,6 +310,11 @@
gen = UnusedFilesGenerator()
else:
gen = UnusedFilesGenerator(total=int(arg[13:]))
+ elif arg.startswith('-lonelypages'):
+ if len(arg) == 12:
+ gen = LonelyPagesPageGenerator()
+ else:
+ gen = LonelyPagesPageGenerator(total=int(arg[13:]))
elif arg.startswith('-unwatched'):
if len(arg) == 10:
gen = UnwatchedPagesPageGenerator()
--
To view, visit
https://gerrit.wikimedia.org/r/137716
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1e61afe05dec67573dda8f9c68fc9ade0de5bf7a
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>