jenkins-bot has submitted this change and it was merged.
Change subject: Add an ItemPage.iterlinks function to yield sitelinks
......................................................................
Add an ItemPage.iterlinks function to yield sitelinks
Change-Id: I43ab820a5d97a22619dc5753d98bdd4ceec277f7
---
M pywikibot/page.py
1 file changed, 17 insertions(+), 0 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 72540eb..81daf92 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2540,6 +2540,23 @@
'claims': self.claims
}
+ def iterlinks(self, family=None):
+ """
+ Iterates through all the sitelinks
+ @param family: string/Family object which represents what family of
+ links to iterate
+ @type family: str|pywikibot.family.Family
+ @return: iterator of pywikibot.Page objects
+ """
+ if not hasattr(self, 'sitelinks'):
+ self.get()
+ if not isinstance(family, pywikibot.family.Family):
+ family = pywikibot.site.Family(family)
+ for dbname in self.sitelinks:
+ pg = Page(pywikibot.site.APISite.fromDBName(dbname), self.sitelinks[dbname])
+ if not family or family == pg.site.family:
+ yield pg
+
def getSitelink(self, site, force=False):
"""
Returns the title (unicode string) for the specific site
--
To view, visit https://gerrit.wikimedia.org/r/79554
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I43ab820a5d97a22619dc5753d98bdd4ceec277f7
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(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: ask for permission to run patch command warning that several scripts might fail, if modules are not installed as needed
......................................................................
ask for permission to run patch command
warning that several scripts might fail, if modules are not installed as needed
Change-Id: Ieaea7b24bee1f569577a1c9ce9dfc9c6f84f4ef4
---
M externals/__init__.py
1 file changed, 18 insertions(+), 1 deletion(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/externals/__init__.py b/externals/__init__.py
index 83045f5..c58c375 100644
--- a/externals/__init__.py
+++ b/externals/__init__.py
@@ -162,6 +162,8 @@
'pydmtx', 'py_w3c', '_zbar', ]
# OPEN: 'opencv', 'slic', '_bob', 'xbob_flandmark',
+_patch_permission = None
+
import os
import sys
@@ -206,6 +208,15 @@
" (y/N)")
v = raw_input().upper()
return v == 'Y' or v == 'YES'
+
+def show_patch_question():
+ globals _patch_permission
+ if _patch_permission is None:
+ lowlevel_warning("Give externals permission to execute the patch command?"
+ " (y/N)")
+ v = raw_input().upper()
+ _patch_permission = (v == 'Y') or (v == 'YES')
+ return _patch_permission
def python_module_exists(module_name):
@@ -335,7 +346,7 @@
shutil.rmtree(os.path.join(path, '__setup_tmp/'))
result = 0
- if 'patch' in package:
+ if ('patch' in package) and show_patch_question():
lowlevel_warning(u'Install package "%s" by applying patch to %s.'
% (module, os.path.join(path, module)))
if sys.platform == 'win32':
@@ -389,6 +400,12 @@
return
lowlevel_warning(u'Package "%s" could not be found nor installed!' % m)
+ lowlevel_warning(u'Several scripts might fail, if some modules are not'
+ u' installed as needed! You can either install them'
+ u' by yourself to the system or extract them into the'
+ u' externals/ directory. If you chose to not install them'
+ u' this script will ask you again next time whether you'
+ u' whish to install the external code.')
def check_setup_all():
--
To view, visit https://gerrit.wikimedia.org/r/77341
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieaea7b24bee1f569577a1c9ce9dfc9c6f84f4ef4
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <dr.trigon(a)surfeu.ch>
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: 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: dates + typo fix
......................................................................
dates + typo fix
Change-Id: Ia38dc2a38abf5731c9676991946f4c0a2d3198b3
---
M README-conversion.txt
M generate_user_files.py
M pwb.py
3 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/README-conversion.txt b/README-conversion.txt
index 99dcf7a..58078da 100644
--- a/README-conversion.txt
+++ b/README-conversion.txt
@@ -115,7 +115,7 @@
The User object has been moved from the userlib module to the pywikibot
namespace. Any references to "userlib.User" can be replaced by
-"pywikibot.User", but the old for mis retained for backwards-compatibility.
+"pywikibot.User", but the old form is retained for backwards-compatibility.
The following changes have occured in the User object:
diff --git a/generate_user_files.py b/generate_user_files.py
index ddd2e6a..b8a0064 100644
--- a/generate_user_files.py
+++ b/generate_user_files.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
""" Script to create user files (user-config.py, user-fixes.py) """
#
-# (C) Pywikipedia team, 2010-2012
+# (C) Pywikipedia team, 2010-2013
#
__version__ = '$Id$'
#
diff --git a/pwb.py b/pwb.py
index 9e7a7d9..ae732ed 100644
--- a/pwb.py
+++ b/pwb.py
@@ -5,7 +5,7 @@
and it will use the package directory to store all user files, will fix up
search paths so the package does not need to be installed, etc.
"""
-# (C) Pywikipedia team, 2012
+# (C) Pywikipedia team, 2013
#
__version__ = '$Id$'
#
--
To view, visit https://gerrit.wikimedia.org/r/79174
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia38dc2a38abf5731c9676991946f4c0a2d3198b3
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Sumanah <sumanah(a)wikimedia.org>
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: jenkins-bot
jenkins-bot has submitted this change and it was merged.
Change subject: update mw version to 1.22wmf12
......................................................................
update mw version to 1.22wmf12
Change-Id: I9ceb5fa7c781171e7dc84eff871452d885035007
---
M family.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/family.py b/family.py
index 4c15a05..871519d 100644
--- a/family.py
+++ b/family.py
@@ -4722,7 +4722,7 @@
"""Return Wikimedia projects version number as a string."""
# Don't use this, use versionnumber() instead. This only exists
# to not break family files.
- return '1.22wmf10'
+ return '1.22wmf12'
def shared_image_repository(self, code):
return ('commons', 'commons')
--
To view, visit https://gerrit.wikimedia.org/r/78904
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9ceb5fa7c781171e7dc84eff871452d885035007
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
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