Xqt has submitted this change and it was merged.
Change subject: A little description about not showing characters when you type passwords, which always confuses people
......................................................................
A little description about not showing characters when you type passwords, which always confuses people
implemented partially from [1]
[1] https://gerrit.wikimedia.org/r/#/c/79730/4/pywikibot/login.py
Change-Id: I6569fcb244f2bb19e6e6b34cc769c187a0e1b2eb
---
M login.py
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
DrTrigon: Checked; Looks good to me, but someone else must approve
Xqt: Looks good to me, approved
diff --git a/login.py b/login.py
index 49befc8..7a812e5 100644
--- a/login.py
+++ b/login.py
@@ -302,7 +302,8 @@
# As we don't want the password to appear on the screen, we set
# password = True
self.password = pywikibot.input(
- u'Password for user %(name)s on %(site)s:'
+ u'Password for user %(name)s on %(site)s\n' \
+ u'No characters will be shown:'
% {'name': self.username, 'site': self.site},
password = True)
@@ -372,8 +373,8 @@
for arg in pywikibot.handleArgs():
if arg.startswith("-pass"):
if len(arg) == 5:
- password = pywikibot.input(u'Password for all accounts:',
- password = True)
+ password = pywikibot.input(u'Password for all accounts ' \
+ u'(no characters will be shown):', password = True)
else:
password = arg[6:]
elif arg == "-clean":
--
To view, visit https://gerrit.wikimedia.org/r/84007
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6569fcb244f2bb19e6e6b34cc769c187a0e1b2eb
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: DrTrigon <dr.trigon(a)surfeu.ch>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Xqt has submitted this change and it was merged.
Change subject: Bug 55610 - time data error
......................................................................
Bug 55610 - time data error
Removed timestamp format conversion in xmlreader.py
[now in will be returned in ISO 8601 (no timezone), as from API]
Conversion from ISO 8601 (no timezone) to MediaWiki format
is done in wikipedia.py, using parsetime2stamp().
Change-Id: I0ce152b2bb85a33a0b91b2b95879f9a90a4268f4
---
M wikipedia.py
M xmlreader.py
2 files changed, 4 insertions(+), 14 deletions(-)
Approvals:
Xqt: Looks good to me, approved
diff --git a/wikipedia.py b/wikipedia.py
index 12eee21..1b27881 100644
--- a/wikipedia.py
+++ b/wikipedia.py
@@ -5105,7 +5105,7 @@
# Sometimes query does not contains revisions
# or some pages are missing. Deactivate api call and use the
# old API special:export
- if self.site.has_api() and logger.isEnabledFor(DEBUG):
+ if self.site.has_api() and logger.isEnabledFor(DEBUG):
while True:
try:
data = self.getDataApi()
@@ -5200,11 +5200,8 @@
page2._revisionId = revisionId
page2._editTime = parsetime2stamp(timestamp)
page2._versionhistory = [
- (revisionId,
- time.strftime("%Y-%m-%dT%H:%M:%SZ",
- time.strptime(str(timestamp),
- "%Y%m%d%H%M%S")),
- username, entry.comment)]
+ (revisionId, timestamp, username, entry.comment)
+ ]
section = page2.section()
# Store the content
page2._contents = text
diff --git a/xmlreader.py b/xmlreader.py
index 344ddf5..d4568af 100644
--- a/xmlreader.py
+++ b/xmlreader.py
@@ -189,18 +189,11 @@
text = self.text.rstrip('\n ')
# Replace newline by cr/nl
text = u'\r\n'.join(text.split('\n'))
- # Decode the timestamp
- timestamp = (self.timestamp[0:4]+
- self.timestamp[5:7]+
- self.timestamp[8:10]+
- self.timestamp[11:13]+
- self.timestamp[14:16]+
- self.timestamp[17:19])
self.title = self.title.strip()
# Report back to the caller
entry = XmlEntry(self.title, self.ns, self.id,
text, self.username,
- self.ipedit, timestamp,
+ self.ipedit, self.timestamp,
self.editRestriction, self.moveRestriction,
self.revisionid, self.comment, self.isredirect)
self.inRevisionTag = False
--
To view, visit https://gerrit.wikimedia.org/r/89322
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0ce152b2bb85a33a0b91b2b95879f9a90a4268f4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change and it was merged.
Change subject: Fix normalization of template name in harvest_template
......................................................................
Fix normalization of template name in harvest_template
bug: 55122
Change-Id: Ie5969c5ac07c0a0f2b8a104f16513e24f0aa796a
---
M scripts/harvest_template.py
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, but someone else must approve
Merlijn van Deen: Looks good to me, approved
Multichill: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index 89b034a..9cf59a1 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -107,8 +107,11 @@
pagetext = page.get()
templates = pywikibot.extract_templates_and_params(pagetext)
for (template, fielddict) in templates:
+ # Clean up template
+ template = pywikibot.Page(page.site, template,
+ ns=10).title(withNamespace=False)
# We found the template we were looking for
- if template.replace(u'_', u' ') in self.templateTitles:
+ if template in self.templateTitles:
for field, value in fielddict.items():
field = field.strip()
value = value.strip()
--
To view, visit https://gerrit.wikimedia.org/r/89046
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5969c5ac07c0a0f2b8a104f16513e24f0aa796a
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Multichill <maarten(a)mdammers.nl>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Multichill <maarten(a)mdammers.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot