jenkins-bot has submitted this change and it was merged.
Change subject: listpages: report number of pages found
......................................................................
listpages: report number of pages found
Bug: T93474
Change-Id: If80c25d3b69a2786d29d5dc4bf21783cd22d9e35
---
M scripts/listpages.py
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/listpages.py b/scripts/listpages.py
index 72cfcb5..55da78b 100644
--- a/scripts/listpages.py
+++ b/scripts/listpages.py
@@ -213,6 +213,7 @@
gen = genFactory.getCombinedGenerator()
if gen:
+ i = 0
for i, page in enumerate(gen, start=1):
if not notitle:
page_fmt = Formatter(page, outputlang)
@@ -227,6 +228,7 @@
pywikibot.output(u'Saving %s to %s' % (page.title(), filename))
with open(filename, mode='wb') as f:
f.write(page.text.encode(encoding))
+ pywikibot.output(u"%i page(s) found" % i)
else:
pywikibot.showHelp()
--
To view, visit
https://gerrit.wikimedia.org/r/198515
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If80c25d3b69a2786d29d5dc4bf21783cd22d9e35
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>