jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/385765 )
Change subject: Partly revert "Merge "[IMPR] Improvements for
reflinks.py""
......................................................................
Partly revert "Merge "[IMPR] Improvements for reflinks.py""
This reverts commit d3321813be3a5c4c2caa41da41d0ffae52dbdf31, reversing
changes made to cdec68327ef440339205caa187496ff115dd25cd.
Change-Id: I0e2e0ce398e6e08ec6cddc4d8bad849e39788896
---
M scripts/reflinks.py
1 file changed, 20 insertions(+), 14 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Verified; Looks good to me, approved
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index 6235bac..6553876 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -761,20 +761,26 @@
genFactory = pagegenerators.GeneratorFactory()
for arg in local_args:
- arg, sep, value = arg.partition(':')
- option = arg.partition('-')[2]
- if option == 'summary':
- options[option] = value
- elif option in ('always', 'ignorepdf'):
- options[option] = True
- elif option == 'limit':
- options[option] = int(value)
- elif option == 'xmlstart':
- xmlStart = value or pywikibot.input(
- 'Please enter the dumped article to start with:')
- elif option == 'xml':
- xmlFilename = value or pywikibot.input(
- "Please enter the XML dump's filename:")
+ if arg.startswith('-summary:'):
+ options['summary'] = arg[9:]
+ elif arg == '-always':
+ options['always'] = True
+ elif arg == '-ignorepdf':
+ options['ignorepdf'] = True
+ elif arg.startswith('-limit:'):
+ options['limit'] = int(arg[7:])
+ elif arg.startswith('-xmlstart'):
+ if len(arg) == 9:
+ xmlStart = pywikibot.input(
+ u'Please enter the dumped article to start with:')
+ else:
+ xmlStart = arg[10:]
+ elif arg.startswith('-xml'):
+ if len(arg) == 4:
+ xmlFilename = pywikibot.input(
+ u'Please enter the XML dump\'s filename:')
+ else:
+ xmlFilename = arg[5:]
else:
genFactory.handleArg(arg)
--
To view, visit
https://gerrit.wikimedia.org/r/385765
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0e2e0ce398e6e08ec6cddc4d8bad849e39788896
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>