jenkins-bot has submitted this change and it was merged.
Change subject: Adding some pages to ignore for nl:
......................................................................
Adding some pages to ignore for nl:
Change-Id: I930cbc551608c788540bc8ba4a810de079b1fb84
---
M scripts/solve_disambiguation.py
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index 5a87738..5f153ae 100755
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -314,6 +314,11 @@
u'Wikipedia:Woorden die niet als zoekterm gebruikt kunnen worden',
u'Overleg gebruiker:Taka(/.*)?',
u"Wikipedia:Links naar doorverwijspagina's/Artikelen",
+ u"Wikipedia:Wikiproject/Redirects/.*",
+ u"Wikipedia:Wikiproject/Muziek/Overzicht/.*",
+ u"Wikipedia:Wikiproject/Roemeense gemeenten/Doorverwijspagina's",
+ u"Overleg Wikipedia:Wikiproject/Redirects.*",
+ u"Wikipedia:Links naar doorverwijspagina's/Amsterdamconstructie",
],
'pl': [
u'Wikipedysta:.+',
--
To view, visit https://gerrit.wikimedia.org/r/268943
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I930cbc551608c788540bc8ba4a810de079b1fb84
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Andre Engels <andreengels(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: solve_disambiguation.py: EditOption._start is an int, do not call it
......................................................................
solve_disambiguation.py: EditOption._start is an int, do not call it
Bug: T126095
Change-Id: I3aa191d2fbe6c402f038d545d698b65356e9c888
---
M scripts/solve_disambiguation.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index 2d92b05..5a87738 100755
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -487,7 +487,7 @@
def result(self, value):
"""Open a text editor and let the user change it."""
editor = editarticle.TextEditor()
- self.new_text = editor.edit(self._text, jumpIndex=self._start(),
+ self.new_text = editor.edit(self._text, jumpIndex=self._start,
highlight=self._title)
return super(EditOption, self).result(value)
--
To view, visit https://gerrit.wikimedia.org/r/268843
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3aa191d2fbe6c402f038d545d698b65356e9c888
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: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #3222
Status: Errored
Duration: 1 hour, 15 minutes, and 41 seconds
Commit: 9fb96d2 (master)
Author: dalba
Message: solve_disambiguation.py: Correct the way main namespace is detected
Previously, passing "-main" option caused the "ignore_title" dict to extend
and include namespace numbers. But those numbers never match a page.title().
Hence the non-main-namespace pages could not be detected.
In the new implementation the "ignore_title" is not extended, instead
"namespaces=0" is passed as a keyword argument to getReferences.
Bug:T105892
Change-Id: Icde898746dd77309d3e42b2da6c40f9bc4ab1194
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/478e71286f24...9fb96d25…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/107219433
--
You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications
jenkins-bot has submitted this change and it was merged.
Change subject: solve_disambiguation.py: Correct the way main namespace is detected
......................................................................
solve_disambiguation.py: Correct the way main namespace is detected
Previously, passing "-main" option caused the "ignore_title" dict to extend
and include namespace numbers. But those numbers never match a page.title().
Hence the non-main-namespace pages could not be detected.
In the new implementation the "ignore_title" is not extended, instead
"namespaces=0" is passed as a keyword argument to getReferences.
Bug:T105892
Change-Id: Icde898746dd77309d3e42b2da6c40f9bc4ab1194
---
M scripts/solve_disambiguation.py
1 file changed, 18 insertions(+), 17 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index 0753773..2d92b05 100755
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -81,7 +81,6 @@
#
import codecs
-import itertools
import os
import re
@@ -362,18 +361,23 @@
"""Referring Page generator, with an ignore manager."""
- def __init__(self, disambPage, primary=False, minimum=0):
+ def __init__(self, disambPage, primary=False, minimum=0, main_only=False):
self.disambPage = disambPage
# if run with the -primary argument, enable the ignore manager
self.primaryIgnoreManager = PrimaryIgnoreManager(disambPage,
enabled=primary)
self.minimum = minimum
+ self.main_only = main_only
def __iter__(self):
# TODO: start yielding before all referring pages have been found
- refs = [page for page in
- self.disambPage.getReferences(follow_redirects=False,
- withTemplateInclusion=False)]
+ refs = [
+ page for page in self.disambPage.getReferences(
+ follow_redirects=False,
+ withTemplateInclusion=False,
+ namespaces=0 if self.main_only else None
+ )
+ ]
pywikibot.output(u"Found %d references." % len(refs))
# Remove ignorables
if self.disambPage.site.family.name in ignore_title and \
@@ -669,8 +673,9 @@
[('yes', 'y'), ('no', 'n'), ('change redirect', 'c')], 'n',
automatic_quit=False)
if choice == 'y':
- gen = ReferringPageGeneratorWithIgnore(refPage,
- self.primary)
+ gen = ReferringPageGeneratorWithIgnore(
+ refPage, self.primary, main_only=self.main_only
+ )
preloadingGen = pagegenerators.PreloadingGenerator(gen)
for refPage2 in preloadingGen:
# run until the user selected 'quit'
@@ -1021,14 +1026,6 @@
'count': len(new_targets)})
def run(self):
- if self.main_only:
- if self.mysite.family.name not in ignore_title:
- ignore_title[self.mysite.family.name] = {}
- if self.mylang not in ignore_title[self.mysite.family.name]:
- ignore_title[self.mysite.family.name][self.mylang] = []
-
- ignore_title[self.mysite.family.name][self.mylang] += [
- '%s:' % ns for ns in itertools.chain(self.mysite.namespaces)]
for disambPage in self.generator:
self.primaryIgnoreManager = PrimaryIgnoreManager(
@@ -1046,8 +1043,12 @@
self.alternatives.sort()
SequenceOutputter(self.alternatives).output()
- gen = ReferringPageGeneratorWithIgnore(disambPage, self.primary,
- minimum=self.minimum)
+ gen = ReferringPageGeneratorWithIgnore(
+ disambPage,
+ self.primary,
+ minimum=self.minimum,
+ main_only=self.main_only
+ )
preloadingGen = pagegenerators.PreloadingGenerator(gen)
for refPage in preloadingGen:
if not self.primaryIgnoreManager.isIgnored(refPage):
--
To view, visit https://gerrit.wikimedia.org/r/268620
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icde898746dd77309d3e42b2da6c40f9bc4ab1194
Gerrit-PatchSet: 3
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: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #3221
Status: Errored
Duration: 1 hour, 18 minutes, and 44 seconds
Commit: 478e712 (master)
Author: zhuyifei1999
Message: site.py: Use api.UploadWarning instead of pywikibot.UploadWarning
site.py recognize pywikibot as the actual module, not the
ModuleDeprecationWrapper. api.UploadWarning is also used elsewhere
in this script instead of pywikibot.UploadWarning.
Bug: T125777
Change-Id: I3b06825fb6ed87a1d0e5f8e5d4b1873c450b9b36
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/0eeb5682aa96...478e7128…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/106983995
--
You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications