lists.wikimedia.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
List overview
Download
Pywikipedia-svn
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
pywikipedia-svn@lists.wikimedia.org
5163 discussions
Start a n
N
ew thread
SVN: [11422] trunk/pywikipedia/maintenance/update_namespaces.py
by xqt@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11422
Revision: 11422 Author: xqt Date: 2013-04-21 18:50:41 +0000 (Sun, 21 Apr 2013) Log Message: ----------- set Module namespaces to default for wikimedia sites Modified Paths: -------------- trunk/pywikipedia/maintenance/update_namespaces.py Modified: trunk/pywikipedia/maintenance/update_namespaces.py =================================================================== --- trunk/pywikipedia/maintenance/update_namespaces.py 2013-04-21 18:41:07 UTC (rev 11421) +++ trunk/pywikipedia/maintenance/update_namespaces.py 2013-04-21 18:50:41 UTC (rev 11422) @@ -63,7 +63,8 @@ output(msg % (namespace_id, lang, ', '.join(namespace_list))) once = False if family and not upmain and \ - namespace_id in range(-2, 16) and namespace_id not in (4, 5): + namespace_id in range(-2, 16) + [828, 829] and \ + namespace_id not in (4, 5): once = True ## namespace_section = re.search(r_namespace_section_once ## % (namespace_id, lang),
1
0
0
0
SVN: [11421] branches/rewrite/pywikibot/bot.py
by drtrigon@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11421
Revision: 11421 Author: drtrigon Date: 2013-04-21 18:41:07 +0000 (Sun, 21 Apr 2013) Log Message: ----------- improvement; allow logging to capture warnings (from trunk) new feature; exception logging/output function (from trunk) Modified Paths: -------------- branches/rewrite/pywikibot/bot.py Modified: branches/rewrite/pywikibot/bot.py =================================================================== --- branches/rewrite/pywikibot/bot.py 2013-04-21 18:29:38 UTC (rev 11420) +++ branches/rewrite/pywikibot/bot.py 2013-04-21 18:41:07 UTC (rev 11421) @@ -191,6 +191,8 @@ root_logger = logging.getLogger("pywiki") root_logger.setLevel(DEBUG+1) # all records except DEBUG go to logger + if hasattr(root_logger, 'captureWarnings'): + root_logger.captureWarnings(True) # introduced in Python >= 2.7 root_logger.handlers = [] # remove any old handlers # configure handler(s) for display to user interface @@ -392,7 +394,30 @@ """Output a debug record to the log file.""" logoutput(text, decoder, newline, DEBUG, layer, **kwargs) +def exception(msg=None, decoder=None, newline=True, full=False, **kwargs): + """Output an error traceback to the user via the userinterface. + Use directly after an 'except' statement: + ... + except: + pywikibot.exception() + ... + or alternatively: + ... + except Exception, e: + pywikibot.exception(e) + ... + """ + if isinstance(msg, BaseException): + exc_info = 1 + else: + exc_info = sys.exc_info() + msg = unicode(exc_info[1]).strip() + if full: + kwargs['exc_info'] = exc_info + logoutput(msg, decoder, newline, ERROR, **kwargs) + + # User input functions def input(question, password=False):
1
0
0
0
SVN: [11420] trunk/pywikipedia/wikipedia.py
by drtrigon@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11420
Revision: 11420 Author: drtrigon Date: 2013-04-21 18:29:38 +0000 (Sun, 21 Apr 2013) Log Message: ----------- improvement; allow logging to capture warnings new feature; exception logging/output function minor docu changes and code fixes Modified Paths: -------------- trunk/pywikipedia/wikipedia.py Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2013-04-21 16:27:26 UTC (rev 11419) +++ trunk/pywikipedia/wikipedia.py 2013-04-21 18:29:38 UTC (rev 11420) @@ -9111,6 +9111,8 @@ logger = logging.getLogger('pywiki') return logger.setLevel(DEBUG+1) # all records except DEBUG go to logger + if hasattr(logger, 'captureWarnings'): + logger.captureWarnings(True) # introduced in Python >= 2.7 if not logname: logname = '%s.log' % moduleName @@ -9382,7 +9384,7 @@ logoutput(text, decoder, newline, VERBOSE, **kwargs) def critical(text, decoder=None, newline=True, **kwargs): - """Output a debug record to the log file.""" + """Output a critical error message to the log file.""" logoutput(text, decoder, newline, CRITICAL, **kwargs) def debug(text, layer="", decoder=None, newline=True, **kwargs): @@ -9390,11 +9392,12 @@ logoutput(text, decoder, newline, DEBUG, layer, **kwargs) def debugDump(name, site, error, data, **kwargs): + """Output a very long debug/error message to own log file.""" name = unicode(name) site = repr(site) data = pprint.pformat(data) if isinstance(error, BaseException): - error = traceback.format_exception_only(type(error), error) + error = traceback.format_exception_only(type(error), error)[-1] else: error = unicode(error) @@ -9413,7 +9416,32 @@ # decoder=None, newline=True, _level=DEBUG, **kwargs) decoder=None, newline=True, _level=ERROR, **kwargs) +def exception(msg=None, decoder=None, newline=True, full=False, **kwargs): + """Output an error traceback to the user via the userinterface. + Use directly after an 'except' statement: + ... + except: + pywikibot.exception() + ... + or alternatively: + ... + except Exception, e: + pywikibot.exception(e) + ... + """ + if isinstance(msg, BaseException): + exc_info = 1 + else: + exc_info = sys.exc_info() + msg = traceback.format_exception_only(exc_info[0], + exc_info[1])[-1].strip() + if full: + kwargs['exc_info'] = exc_info + _outputOld(traceback.format_exc().strip()) # (temporary work-a-round) + logoutput(msg, decoder, newline, ERROR, **kwargs) + + # User input functions def input(question, password = False): @@ -9511,6 +9539,7 @@ not slow down other bots any more. """ get_throttle.drop() + logging.shutdown() def _flush(): """Wait for the page-putter to flush its queue.
1
0
0
0
SVN: [11419] trunk/pywikipedia/families
by xqt@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11419
Revision: 11419 Author: xqt Date: 2013-04-21 16:27:26 +0000 (Sun, 21 Apr 2013) Log Message: ----------- update namespace aliases Modified Paths: -------------- trunk/pywikipedia/families/meta_family.py trunk/pywikipedia/families/wikibooks_family.py trunk/pywikipedia/families/wikidata_family.py trunk/pywikipedia/families/wikivoyage_family.py Modified: trunk/pywikipedia/families/meta_family.py =================================================================== --- trunk/pywikipedia/families/meta_family.py 2013-04-21 16:22:21 UTC (rev 11418) +++ trunk/pywikipedia/families/meta_family.py 2013-04-21 16:27:26 UTC (rev 11419) @@ -51,6 +51,18 @@ self.namespaces[471] = { '_default': u'Schema talk', } + self.namespaces[480] = { + '_default': u'Zero', + } + self.namespaces[481] = { + '_default': u'Zero talk', + } + self.namespaces[866] = { + '_default': u'CNBanner', + } + self.namespaces[867] = { + '_default': u'CNBanner talk', + } self.namespaces[1198] = { '_default': u'Translations', } Modified: trunk/pywikipedia/families/wikibooks_family.py =================================================================== --- trunk/pywikipedia/families/wikibooks_family.py 2013-04-21 16:22:21 UTC (rev 11418) +++ trunk/pywikipedia/families/wikibooks_family.py 2013-04-21 16:27:26 UTC (rev 11419) @@ -322,6 +322,7 @@ 'ro': u'Wikijunior', 'ru': u'Импортировано', 'sr': u'Кувар', + 'th': u'หัวเรื่อง', 'uk': u'Рецепт', 'vi': u'Chủ đề', } @@ -341,6 +342,7 @@ 'ro': u'Discuţie Wikijunior', 'ru': u'Обсуждение импортированного', 'sr': u'Разговор о кувару', + 'th': u'คุยเรื่องหัวเรื่อง', 'uk': u'Обговорення рецепта', 'vi': u'Thảo luận Chủ đề', } Modified: trunk/pywikipedia/families/wikidata_family.py =================================================================== --- trunk/pywikipedia/families/wikidata_family.py 2013-04-21 16:22:21 UTC (rev 11418) +++ trunk/pywikipedia/families/wikidata_family.py 2013-04-21 16:27:26 UTC (rev 11419) @@ -19,12 +19,6 @@ # Override defaults self.namespaces[1]['repo'] = [u'Talk', u'Item talk'] self.namespaces[0]['repo'] = [u'', u'Item'] - self.namespaces[828]['client'] = [u'Module'] - self.namespaces[829]['client'] = [u'Module talk'] - self.namespaces[828]['wikidata'] = [u'Module'] - self.namespaces[829]['wikidata'] = [u'Module talk'] - del(self.namespaces[828]['_default']) - del(self.namespaces[829]['_default']) # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. Modified: trunk/pywikipedia/families/wikivoyage_family.py =================================================================== --- trunk/pywikipedia/families/wikivoyage_family.py 2013-04-21 16:22:21 UTC (rev 11418) +++ trunk/pywikipedia/families/wikivoyage_family.py 2013-04-21 16:27:26 UTC (rev 11419) @@ -25,7 +25,7 @@ self.namespaces[3]['pt'] = [u'Utilizador Discussão', u'Usuário Discussão', u'Utilizadora Discussão'] self.namespaces[2]['pt'] = [u'Utilizador', u'Usuário', u'Utilizadora'] self.namespaces[12]['uk'] = [u'Довідка', u'Д'] - self.namespaces[14]['uk'] = [u'Категорія', u'K'] + self.namespaces[14]['uk'] = [u'Категорія', u'К'] self.namespaces[9]['ro'] = [u'Discuție MediaWiki', u'Discuţie MediaWiki'] self.namespaces[3]['pl'] = [u'Dyskusja użytkownika', u'Dyskusja użytkowniczki'] self.namespaces[2]['pl'] = [u'Użytkownik', u'Użytkowniczka']
1
0
0
0
SVN: [11418] trunk/pywikipedia/families
by xqt@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11418
Revision: 11418 Author: xqt Date: 2013-04-21 16:22:21 +0000 (Sun, 21 Apr 2013) Log Message: ----------- update language_by_sites for unlisted sites, update from rewrite r11417 Modified Paths: -------------- trunk/pywikipedia/families/wikipedia_family.py trunk/pywikipedia/families/wikisource_family.py trunk/pywikipedia/families/wikiversity_family.py trunk/pywikipedia/families/wiktionary_family.py Modified: trunk/pywikipedia/families/wikipedia_family.py =================================================================== --- trunk/pywikipedia/families/wikipedia_family.py 2013-04-21 16:21:47 UTC (rev 11417) +++ trunk/pywikipedia/families/wikipedia_family.py 2013-04-21 16:22:21 UTC (rev 11418) @@ -26,8 +26,8 @@ 'nah', 'sa', 'os', 'sah', 'pam', 'hsb', 'si', 'se', 'li', 'bar', 'mi', 'co', 'ilo', 'gan', 'bo', 'fo', 'glk', 'rue', 'pa', 'bcl', 'fiu-vro', 'mrj', 'nds-nl', 'tk', 'ps', 'vls', 'xmf', 'gv', 'diq', - 'pag', 'kv', 'or', 'zea', 'dv', 'km', 'nrm', 'rm', 'koi', 'udm', - 'mhr', 'frr', 'csb', 'lad', 'vep', 'lij', 'wuu', 'fur', + 'min', 'pag', 'kv', 'or', 'zea', 'dv', 'km', 'nrm', 'rm', 'koi', + 'udm', 'mhr', 'frr', 'csb', 'lad', 'vep', 'lij', 'wuu', 'fur', 'zh-classical', 'ug', 'stq', 'sc', 'pi', 'ay', 'so', 'mt', 'bh', 'nov', 'ksh', 'ang', 'kw', 'nv', 'pcd', 'hak', 'gn', 'ext', 'frp', 'as', 'szl', 'gag', 'ie', 'eml', 'ln', 'ce', 'krc', 'pfl', 'xal', @@ -38,7 +38,7 @@ 'rmy', 'roa-rup', 'cu', 'tn', 'chr', 'bi', 'cdo', 'got', 'sm', 'bm', 'iu', 'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'om', 'fj', 'ti', 'ts', 'ks', 've', 'sg', 'rn', 'st', 'dz', 'ak', 'cr', 'tum', 'lg', - 'ny', 'ff', 'ch', 'ik', 'tw', 'xh', 'min', + 'ny', 'ff', 'ch', 'ik', 'tw', 'xh', ] self.langs = dict([(lang, '%s.wikipedia.org' % lang) Modified: trunk/pywikipedia/families/wikisource_family.py =================================================================== --- trunk/pywikipedia/families/wikisource_family.py 2013-04-21 16:21:47 UTC (rev 11417) +++ trunk/pywikipedia/families/wikisource_family.py 2013-04-21 16:22:21 UTC (rev 11418) @@ -15,7 +15,7 @@ 'fa', 'ca', 'hu', 'ar', 'cs', 'ko', 'sl', 'ro', 'fi', 'vi', 'te', 'sa', 'el', 'sr', 'hr', 'bn', 'th', 'no', 'hy', 'nl', 'ml', 'la', 'vec', 'tr', 'ja', 'eo', 'br', 'yi', 'mk', 'gu', 'uk', 'is', 'ta', - 'id', 'be', 'da', 'li', 'et', 'bg', 'mr', 'bs', 'as', 'sah', 'az', + 'id', 'be', 'da', 'li', 'et', 'bg', 'as', 'mr', 'bs', 'sah', 'az', 'gl', 'kn', 'lt', 'cy', 'sk', 'zh-min-nan', 'fo', ] Modified: trunk/pywikipedia/families/wikiversity_family.py =================================================================== --- trunk/pywikipedia/families/wikiversity_family.py 2013-04-21 16:21:47 UTC (rev 11417) +++ trunk/pywikipedia/families/wikiversity_family.py 2013-04-21 16:22:21 UTC (rev 11418) @@ -12,7 +12,7 @@ self.languages_by_size = [ 'en', 'fr', 'de', 'beta', 'cs', 'ru', 'it', 'es', 'pt', 'ar', 'sv', - 'fi', 'el', 'ko', 'sl', 'ja', + 'fi', 'el', 'sl', 'ko', 'ja', ] self.langs = dict([(lang, '%s.wikiversity.org' % lang) Modified: trunk/pywikipedia/families/wiktionary_family.py =================================================================== --- trunk/pywikipedia/families/wiktionary_family.py 2013-04-21 16:21:47 UTC (rev 11417) +++ trunk/pywikipedia/families/wiktionary_family.py 2013-04-21 16:22:21 UTC (rev 11418) @@ -18,7 +18,7 @@ 'eo', 'hr', 'oc', 'is', 'vo', 'th', 'simple', 'zh-min-nan', 'cy', 'scn', 'sr', 'af', 'ps', 'ast', 'sw', 'fy', 'tl', 'nn', 'he', 'ur', 'da', 'uz', 'wa', 'la', 'hy', 'sq', 'sm', 'sl', 'hi', 'nah', 'ka', - 'az', 'pnb', 'tt', 'bs', 'lv', 'lb', 'tk', 'hsb', 'kk', 'sk', 'km', + 'pnb', 'az', 'tt', 'bs', 'lv', 'lb', 'tk', 'hsb', 'kk', 'sk', 'km', 'mk', 'be', 'ga', 'wo', 'ms', 'nds', 'ang', 'ky', 'co', 'gn', 'mr', 'csb', 'st', 'ia', 'sd', 'si', 'sh', 'tg', 'ug', 'sa', 'mn', 'kl', 'jbo', 'an', 'ln', 'zu', 'or', 'gu', 'kw', 'rw', 'gv', 'fo', 'qu',
1
0
0
0
SVN: [11417] branches/rewrite/pywikibot/families
by xqt@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11417
Revision: 11417 Author: xqt Date: 2013-04-21 16:21:47 +0000 (Sun, 21 Apr 2013) Log Message: ----------- update language_by_sites for unlisted sites Modified Paths: -------------- branches/rewrite/pywikibot/families/wikipedia_family.py branches/rewrite/pywikibot/families/wikisource_family.py branches/rewrite/pywikibot/families/wikiversity_family.py branches/rewrite/pywikibot/families/wiktionary_family.py Modified: branches/rewrite/pywikibot/families/wikipedia_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikipedia_family.py 2013-04-21 16:06:16 UTC (rev 11416) +++ branches/rewrite/pywikibot/families/wikipedia_family.py 2013-04-21 16:21:47 UTC (rev 11417) @@ -26,8 +26,8 @@ 'nah', 'sa', 'os', 'sah', 'pam', 'hsb', 'si', 'se', 'li', 'bar', 'mi', 'co', 'ilo', 'gan', 'bo', 'fo', 'glk', 'rue', 'pa', 'bcl', 'fiu-vro', 'mrj', 'nds-nl', 'tk', 'ps', 'vls', 'xmf', 'gv', 'diq', - 'pag', 'kv', 'or', 'zea', 'dv', 'km', 'nrm', 'rm', 'koi', 'udm', - 'mhr', 'frr', 'csb', 'lad', 'vep', 'lij', 'wuu', 'fur', + 'min', 'pag', 'kv', 'or', 'zea', 'dv', 'km', 'nrm', 'rm', 'koi', + 'udm', 'mhr', 'frr', 'csb', 'lad', 'vep', 'lij', 'wuu', 'fur', 'zh-classical', 'ug', 'stq', 'sc', 'pi', 'ay', 'so', 'mt', 'bh', 'nov', 'ksh', 'ang', 'kw', 'nv', 'pcd', 'hak', 'gn', 'ext', 'frp', 'as', 'szl', 'gag', 'ie', 'eml', 'ln', 'ce', 'krc', 'pfl', 'xal', @@ -38,7 +38,7 @@ 'rmy', 'roa-rup', 'cu', 'tn', 'chr', 'bi', 'cdo', 'got', 'sm', 'bm', 'iu', 'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'om', 'fj', 'ti', 'ts', 'ks', 've', 'sg', 'rn', 'st', 'dz', 'ak', 'cr', 'tum', 'lg', - 'ny', 'ff', 'ch', 'ik', 'tw', 'xh', 'min', + 'ny', 'ff', 'ch', 'ik', 'tw', 'xh', ] self.langs = dict([(lang, '%s.wikipedia.org' % lang) Modified: branches/rewrite/pywikibot/families/wikisource_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikisource_family.py 2013-04-21 16:06:16 UTC (rev 11416) +++ branches/rewrite/pywikibot/families/wikisource_family.py 2013-04-21 16:21:47 UTC (rev 11417) @@ -14,8 +14,8 @@ 'fr', 'en', 'de', 'ru', 'it', 'pl', 'zh', 'he', 'pt', 'es', 'sv', 'fa', 'ca', 'hu', 'ar', 'cs', 'ko', 'sl', 'ro', 'fi', 'vi', 'te', 'sa', 'el', 'sr', 'hr', 'bn', 'th', 'no', 'hy', 'nl', 'ml', 'la', - 'vec', 'tr', 'eo', 'ja', 'br', 'yi', 'mk', 'gu', 'uk', 'is', 'ta', - 'id', 'be', 'da', 'li', 'et', 'bg', 'mr', 'bs', 'as', 'sah', 'az', + 'vec', 'tr', 'ja', 'eo', 'br', 'yi', 'mk', 'gu', 'uk', 'is', 'ta', + 'id', 'be', 'da', 'li', 'et', 'bg', 'as', 'mr', 'bs', 'sah', 'az', 'gl', 'kn', 'lt', 'cy', 'sk', 'zh-min-nan', 'fo', ] Modified: branches/rewrite/pywikibot/families/wikiversity_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikiversity_family.py 2013-04-21 16:06:16 UTC (rev 11416) +++ branches/rewrite/pywikibot/families/wikiversity_family.py 2013-04-21 16:21:47 UTC (rev 11417) @@ -12,7 +12,7 @@ self.languages_by_size = [ 'en', 'fr', 'de', 'beta', 'cs', 'ru', 'it', 'es', 'pt', 'ar', 'sv', - 'fi', 'el', 'ko', 'sl', 'ja', + 'fi', 'el', 'sl', 'ko', 'ja', ] self.langs = dict([(lang, '%s.wikiversity.org' % lang) Modified: branches/rewrite/pywikibot/families/wiktionary_family.py =================================================================== --- branches/rewrite/pywikibot/families/wiktionary_family.py 2013-04-21 16:06:16 UTC (rev 11416) +++ branches/rewrite/pywikibot/families/wiktionary_family.py 2013-04-21 16:21:47 UTC (rev 11417) @@ -18,7 +18,7 @@ 'eo', 'hr', 'oc', 'is', 'vo', 'th', 'simple', 'zh-min-nan', 'cy', 'scn', 'sr', 'af', 'ps', 'ast', 'sw', 'fy', 'tl', 'nn', 'he', 'ur', 'da', 'uz', 'wa', 'la', 'hy', 'sq', 'sm', 'sl', 'hi', 'nah', 'ka', - 'az', 'pnb', 'tt', 'bs', 'lv', 'lb', 'tk', 'hsb', 'kk', 'sk', 'km', + 'pnb', 'az', 'tt', 'bs', 'lv', 'lb', 'tk', 'hsb', 'kk', 'sk', 'km', 'mk', 'be', 'ga', 'wo', 'ms', 'nds', 'ang', 'ky', 'co', 'gn', 'mr', 'csb', 'st', 'ia', 'sd', 'si', 'sh', 'tg', 'ug', 'sa', 'mn', 'kl', 'jbo', 'an', 'ln', 'zu', 'or', 'gu', 'kw', 'rw', 'gv', 'fo', 'qu',
1
0
0
0
SVN: [11416] branches/rewrite/pywikibot/families
by xqt@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11416
Revision: 11416 Author: xqt Date: 2013-04-21 16:06:16 +0000 (Sun, 21 Apr 2013) Log Message: ----------- update language_by_size from trunk r11415 Modified Paths: -------------- branches/rewrite/pywikibot/families/wikibooks_family.py branches/rewrite/pywikibot/families/wikipedia_family.py branches/rewrite/pywikibot/families/wiktionary_family.py Modified: branches/rewrite/pywikibot/families/wikibooks_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikibooks_family.py 2013-04-21 15:59:49 UTC (rev 11415) +++ branches/rewrite/pywikibot/families/wikibooks_family.py 2013-04-21 16:06:16 UTC (rev 11416) @@ -11,11 +11,11 @@ self.name = 'wikibooks' self.languages_by_size = [ - 'en', 'de', 'fr', 'hu', 'ja', 'pt', 'it', 'vi', 'nl', 'pl', 'es', + 'en', 'de', 'fr', 'hu', 'ja', 'pt', 'vi', 'it', 'nl', 'pl', 'es', 'he', 'sq', 'ca', 'id', 'fi', 'ru', 'cs', 'zh', 'sv', 'hr', 'tr', - 'da', 'no', 'th', 'gl', 'fa', 'ko', 'sr', 'ta', 'ar', 'mk', 'tl', + 'da', 'no', 'th', 'gl', 'sr', 'fa', 'ko', 'ta', 'ar', 'mk', 'tl', 'ro', 'is', 'tt', 'lt', 'ka', 'az', 'uk', 'eo', 'bg', 'el', 'hy', - 'sl', 'sk', 'si', 'li', 'la', 'ms', 'ang', 'ia', 'cv', 'et', 'ur', + 'sl', 'sk', 'si', 'li', 'ms', 'la', 'ang', 'ia', 'cv', 'et', 'ur', 'mr', 'bn', 'hi', 'ml', 'oc', 'kk', 'km', 'eu', 'fy', 'ie', 'ne', 'sa', 'te', 'af', 'tg', 'ky', 'bs', 'pa', 'mg', 'be', 'cy', 'zh-min-nan', 'ku', 'uz', Modified: branches/rewrite/pywikibot/families/wikipedia_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikipedia_family.py 2013-04-21 15:59:49 UTC (rev 11415) +++ branches/rewrite/pywikibot/families/wikipedia_family.py 2013-04-21 16:06:16 UTC (rev 11416) @@ -13,32 +13,32 @@ self.languages_by_size = [ 'en', 'de', 'nl', 'fr', 'it', 'ru', 'es', 'sv', 'pl', 'ja', 'pt', 'zh', 'vi', 'uk', 'ca', 'war', 'no', 'ceb', 'fi', 'fa', 'cs', 'hu', - 'ko', 'ro', 'ar', 'tr', 'id', 'ms', 'kk', 'sr', 'sk', 'eo', 'da', - 'lt', 'eu', 'bg', 'he', 'hr', 'sl', 'vo', 'et', 'uz', 'hi', 'gl', + 'ko', 'ar', 'ro', 'ms', 'tr', 'id', 'kk', 'sr', 'sk', 'eo', 'da', + 'lt', 'eu', 'bg', 'he', 'hr', 'sl', 'vo', 'uz', 'et', 'hi', 'gl', 'nn', 'simple', 'az', 'la', 'el', 'th', 'sh', 'ka', 'oc', 'mk', 'new', 'tl', 'pms', 'be', 'ht', 'ta', 'te', 'be-x-old', 'lv', 'br', - 'mg', 'sq', 'hy', 'tt', 'jv', 'cy', 'mr', 'lb', 'is', 'bs', 'my', - 'yo', 'ba', 'ml', 'an', 'lmo', 'af', 'pnb', 'fy', 'bn', 'sw', 'bpy', + 'bs', 'sq', 'mg', 'hy', 'tt', 'jv', 'cy', 'mr', 'lb', 'is', 'my', + 'yo', 'ba', 'ml', 'an', 'lmo', 'af', 'fy', 'pnb', 'bn', 'sw', 'bpy', 'io', 'ky', 'ur', 'ne', 'scn', 'gu', 'zh-yue', 'nds', 'ku', 'ga', 'ast', 'qu', 'su', 'cv', 'sco', 'als', 'ia', 'bug', 'nap', 'bat-smg', 'kn', 'map-bms', 'wa', 'am', 'ckb', 'gd', 'hif', 'zh-min-nan', 'tg', 'mzn', 'arz', 'yi', 'vec', 'mn', 'roa-tara', - 'sa', 'nah', 'os', 'sah', 'pam', 'hsb', 'si', 'se', 'li', 'mi', - 'bar', 'co', 'ilo', 'gan', 'bo', 'glk', 'fo', 'rue', 'pa', 'bcl', - 'mrj', 'fiu-vro', 'nds-nl', 'tk', 'ps', 'vls', 'xmf', 'gv', 'diq', + 'nah', 'sa', 'os', 'sah', 'pam', 'hsb', 'si', 'se', 'li', 'bar', + 'mi', 'co', 'ilo', 'gan', 'bo', 'fo', 'glk', 'rue', 'pa', 'bcl', + 'fiu-vro', 'mrj', 'nds-nl', 'tk', 'ps', 'vls', 'xmf', 'gv', 'diq', 'pag', 'kv', 'or', 'zea', 'dv', 'km', 'nrm', 'rm', 'koi', 'udm', - 'mhr', 'frr', 'lad', 'csb', 'lij', 'wuu', 'vep', 'fur', - 'zh-classical', 'ug', 'stq', 'sc', 'pi', 'so', 'bh', 'mt', 'ay', + 'mhr', 'frr', 'csb', 'lad', 'vep', 'lij', 'wuu', 'fur', + 'zh-classical', 'ug', 'stq', 'sc', 'pi', 'ay', 'so', 'mt', 'bh', 'nov', 'ksh', 'ang', 'kw', 'nv', 'pcd', 'hak', 'gn', 'ext', 'frp', - 'as', 'szl', 'gag', 'ie', 'ln', 'eml', 'ce', 'xal', 'pfl', 'haw', - 'krc', 'pdc', 'rw', 'crh', 'ace', 'to', 'kl', 'dsb', 'arc', 'myv', - 'lez', 'bjn', 'sn', 'kab', 'pap', 'tpi', 'lbe', 'bxr', 'wo', 'jbo', - 'mdf', 'cbk-zam', 'av', 'srn', 'mwl', 'kbd', 'ty', 'lo', 'ab', - 'tet', 'ltg', 'na', 'kg', 'ig', 'nso', 'za', 'kaa', 'zu', 'chy', + 'as', 'szl', 'gag', 'ie', 'eml', 'ln', 'ce', 'krc', 'pfl', 'xal', + 'haw', 'pdc', 'rw', 'ace', 'crh', 'to', 'dsb', 'kl', 'arc', 'myv', + 'lez', 'sn', 'kab', 'bjn', 'pap', 'tpi', 'lbe', 'wo', 'jbo', 'mdf', + 'cbk-zam', 'av', 'srn', 'mwl', 'kbd', 'ty', 'lo', 'ab', 'tet', + 'ltg', 'na', 'ig', 'kg', 'bxr', 'nso', 'za', 'kaa', 'zu', 'chy', 'rmy', 'roa-rup', 'cu', 'tn', 'chr', 'bi', 'cdo', 'got', 'sm', 'bm', 'iu', 'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'om', 'fj', 'ti', - 'ts', 'ks', 've', 'sg', 'rn', 'st', 'dz', 'cr', 'ak', 'tum', 'lg', - 'ny', 'ff', 'ik', 'ch', 'tw', 'xh', 'min', + 'ts', 'ks', 've', 'sg', 'rn', 'st', 'dz', 'ak', 'cr', 'tum', 'lg', + 'ny', 'ff', 'ch', 'ik', 'tw', 'xh', 'min', ] self.langs = dict([(lang, '%s.wikipedia.org' % lang) Modified: branches/rewrite/pywikibot/families/wiktionary_family.py =================================================================== --- branches/rewrite/pywikibot/families/wiktionary_family.py 2013-04-21 15:59:49 UTC (rev 11415) +++ branches/rewrite/pywikibot/families/wiktionary_family.py 2013-04-21 16:06:16 UTC (rev 11416) @@ -12,19 +12,19 @@ self.languages_by_size = [ 'en', 'fr', 'mg', 'zh', 'lt', 'ru', 'el', 'ko', 'sv', 'pl', 'tr', - 'ta', 'nl', 'de', 'ku', 'kn', 'vi', 'fi', 'io', 'hu', 'pt', 'ml', - 'no', 'my', 'id', 'it', 'li', 'es', 'et', 'ja', 'fa', 'te', 'ro', + 'ta', 'nl', 'de', 'ku', 'kn', 'vi', 'fi', 'io', 'pt', 'hu', 'ml', + 'no', 'my', 'id', 'it', 'li', 'es', 'et', 'ja', 'te', 'fa', 'ro', 'ar', 'cs', 'jv', 'eu', 'gl', 'lo', 'ca', 'uk', 'fj', 'br', 'bg', 'eo', 'hr', 'oc', 'is', 'vo', 'th', 'simple', 'zh-min-nan', 'cy', - 'scn', 'sr', 'af', 'ast', 'ps', 'sw', 'fy', 'tl', 'nn', 'he', 'ur', - 'da', 'uz', 'wa', 'la', 'hy', 'sq', 'sm', 'sl', 'hi', 'nah', 'az', - 'tt', 'pnb', 'ka', 'lv', 'bs', 'lb', 'tk', 'hsb', 'kk', 'sk', 'km', - 'mk', 'be', 'ga', 'wo', 'ms', 'ang', 'ky', 'nds', 'co', 'gn', 'mr', - 'csb', 'st', 'ia', 'si', 'sh', 'sd', 'tg', 'ug', 'mn', 'sa', 'kl', + 'scn', 'sr', 'af', 'ps', 'ast', 'sw', 'fy', 'tl', 'nn', 'he', 'ur', + 'da', 'uz', 'wa', 'la', 'hy', 'sq', 'sm', 'sl', 'hi', 'nah', 'ka', + 'az', 'pnb', 'tt', 'bs', 'lv', 'lb', 'tk', 'hsb', 'kk', 'sk', 'km', + 'mk', 'be', 'ga', 'wo', 'ms', 'nds', 'ang', 'ky', 'co', 'gn', 'mr', + 'csb', 'st', 'ia', 'sd', 'si', 'sh', 'tg', 'ug', 'sa', 'mn', 'kl', 'jbo', 'an', 'ln', 'zu', 'or', 'gu', 'kw', 'rw', 'gv', 'fo', 'qu', 'ss', 'ie', 'mt', 'om', 'chr', 'roa-rup', 'iu', 'bn', 'pa', 'so', - 'am', 'su', 'za', 'gd', 'mi', 'tpi', 'yi', 'ti', 'sg', 'na', 'dv', - 'tn', 'ne', 'ha', 'ks', 'ay', 'ts', + 'am', 'su', 'za', 'gd', 'mi', 'tpi', 'ne', 'yi', 'ti', 'sg', 'na', + 'dv', 'tn', 'ha', 'ks', 'ay', 'ts', ] self.langs = dict([(lang, '%s.wiktionary.org' % lang)
1
0
0
0
SVN: [11415] trunk/pywikipedia/families
by xqt@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11415
Revision: 11415 Author: xqt Date: 2013-04-21 15:59:49 +0000 (Sun, 21 Apr 2013) Log Message: ----------- update language_by_size Modified Paths: -------------- trunk/pywikipedia/families/wikibooks_family.py trunk/pywikipedia/families/wikipedia_family.py trunk/pywikipedia/families/wiktionary_family.py Modified: trunk/pywikipedia/families/wikibooks_family.py =================================================================== --- trunk/pywikipedia/families/wikibooks_family.py 2013-04-21 15:58:42 UTC (rev 11414) +++ trunk/pywikipedia/families/wikibooks_family.py 2013-04-21 15:59:49 UTC (rev 11415) @@ -13,7 +13,7 @@ self.languages_by_size = [ 'en', 'de', 'fr', 'hu', 'ja', 'pt', 'vi', 'it', 'nl', 'pl', 'es', 'he', 'sq', 'ca', 'id', 'fi', 'ru', 'cs', 'zh', 'sv', 'hr', 'tr', - 'da', 'no', 'th', 'gl', 'fa', 'sr', 'ko', 'ta', 'ar', 'mk', 'tl', + 'da', 'no', 'th', 'gl', 'sr', 'fa', 'ko', 'ta', 'ar', 'mk', 'tl', 'ro', 'is', 'tt', 'lt', 'ka', 'az', 'uk', 'eo', 'bg', 'el', 'hy', 'sl', 'sk', 'si', 'li', 'ms', 'la', 'ang', 'ia', 'cv', 'et', 'ur', 'mr', 'bn', 'hi', 'ml', 'oc', 'kk', 'km', 'eu', 'fy', 'ie', 'ne', Modified: trunk/pywikipedia/families/wikipedia_family.py =================================================================== --- trunk/pywikipedia/families/wikipedia_family.py 2013-04-21 15:58:42 UTC (rev 11414) +++ trunk/pywikipedia/families/wikipedia_family.py 2013-04-21 15:59:49 UTC (rev 11415) @@ -13,32 +13,32 @@ self.languages_by_size = [ 'en', 'de', 'nl', 'fr', 'it', 'ru', 'es', 'sv', 'pl', 'ja', 'pt', 'zh', 'vi', 'uk', 'ca', 'war', 'no', 'ceb', 'fi', 'fa', 'cs', 'hu', - 'ko', 'ro', 'ar', 'ms', 'tr', 'id', 'kk', 'sr', 'sk', 'eo', 'da', - 'lt', 'eu', 'bg', 'he', 'hr', 'sl', 'vo', 'et', 'uz', 'hi', 'gl', + 'ko', 'ar', 'ro', 'ms', 'tr', 'id', 'kk', 'sr', 'sk', 'eo', 'da', + 'lt', 'eu', 'bg', 'he', 'hr', 'sl', 'vo', 'uz', 'et', 'hi', 'gl', 'nn', 'simple', 'az', 'la', 'el', 'th', 'sh', 'ka', 'oc', 'mk', 'new', 'tl', 'pms', 'be', 'ht', 'ta', 'te', 'be-x-old', 'lv', 'br', - 'mg', 'sq', 'hy', 'bs', 'tt', 'jv', 'cy', 'mr', 'lb', 'is', 'my', + 'bs', 'sq', 'mg', 'hy', 'tt', 'jv', 'cy', 'mr', 'lb', 'is', 'my', 'yo', 'ba', 'ml', 'an', 'lmo', 'af', 'fy', 'pnb', 'bn', 'sw', 'bpy', 'io', 'ky', 'ur', 'ne', 'scn', 'gu', 'zh-yue', 'nds', 'ku', 'ga', 'ast', 'qu', 'su', 'cv', 'sco', 'als', 'ia', 'bug', 'nap', 'bat-smg', 'kn', 'map-bms', 'wa', 'am', 'ckb', 'gd', 'hif', 'zh-min-nan', 'tg', 'mzn', 'arz', 'yi', 'vec', 'mn', 'roa-tara', - 'nah', 'sa', 'os', 'sah', 'pam', 'hsb', 'si', 'se', 'li', 'mi', - 'bar', 'co', 'ilo', 'gan', 'bo', 'fo', 'glk', 'rue', 'pa', 'bcl', + 'nah', 'sa', 'os', 'sah', 'pam', 'hsb', 'si', 'se', 'li', 'bar', + 'mi', 'co', 'ilo', 'gan', 'bo', 'fo', 'glk', 'rue', 'pa', 'bcl', 'fiu-vro', 'mrj', 'nds-nl', 'tk', 'ps', 'vls', 'xmf', 'gv', 'diq', 'pag', 'kv', 'or', 'zea', 'dv', 'km', 'nrm', 'rm', 'koi', 'udm', - 'mhr', 'frr', 'lad', 'csb', 'vep', 'lij', 'wuu', 'fur', - 'zh-classical', 'stq', 'ug', 'sc', 'pi', 'so', 'mt', 'bh', 'ay', + 'mhr', 'frr', 'csb', 'lad', 'vep', 'lij', 'wuu', 'fur', + 'zh-classical', 'ug', 'stq', 'sc', 'pi', 'ay', 'so', 'mt', 'bh', 'nov', 'ksh', 'ang', 'kw', 'nv', 'pcd', 'hak', 'gn', 'ext', 'frp', - 'as', 'szl', 'gag', 'ie', 'ln', 'eml', 'ce', 'xal', 'pfl', 'krc', + 'as', 'szl', 'gag', 'ie', 'eml', 'ln', 'ce', 'krc', 'pfl', 'xal', 'haw', 'pdc', 'rw', 'ace', 'crh', 'to', 'dsb', 'kl', 'arc', 'myv', - 'lez', 'bjn', 'sn', 'kab', 'pap', 'tpi', 'lbe', 'wo', 'jbo', 'mdf', + 'lez', 'sn', 'kab', 'bjn', 'pap', 'tpi', 'lbe', 'wo', 'jbo', 'mdf', 'cbk-zam', 'av', 'srn', 'mwl', 'kbd', 'ty', 'lo', 'ab', 'tet', - 'ltg', 'na', 'kg', 'ig', 'bxr', 'nso', 'za', 'kaa', 'zu', 'chy', + 'ltg', 'na', 'ig', 'kg', 'bxr', 'nso', 'za', 'kaa', 'zu', 'chy', 'rmy', 'roa-rup', 'cu', 'tn', 'chr', 'bi', 'cdo', 'got', 'sm', 'bm', 'iu', 'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'om', 'fj', 'ti', 'ts', 'ks', 've', 'sg', 'rn', 'st', 'dz', 'ak', 'cr', 'tum', 'lg', - 'ny', 'ff', 'ik', 'ch', 'tw', 'xh', 'min', + 'ny', 'ff', 'ch', 'ik', 'tw', 'xh', 'min', ] self.langs = dict([(lang, '%s.wikipedia.org' % lang) Modified: trunk/pywikipedia/families/wiktionary_family.py =================================================================== --- trunk/pywikipedia/families/wiktionary_family.py 2013-04-21 15:58:42 UTC (rev 11414) +++ trunk/pywikipedia/families/wiktionary_family.py 2013-04-21 15:59:49 UTC (rev 11415) @@ -13,14 +13,14 @@ self.languages_by_size = [ 'en', 'fr', 'mg', 'zh', 'lt', 'ru', 'el', 'ko', 'sv', 'pl', 'tr', 'ta', 'nl', 'de', 'ku', 'kn', 'vi', 'fi', 'io', 'pt', 'hu', 'ml', - 'no', 'my', 'id', 'it', 'li', 'es', 'et', 'ja', 'fa', 'te', 'ro', + 'no', 'my', 'id', 'it', 'li', 'es', 'et', 'ja', 'te', 'fa', 'ro', 'ar', 'cs', 'jv', 'eu', 'gl', 'lo', 'ca', 'uk', 'fj', 'br', 'bg', 'eo', 'hr', 'oc', 'is', 'vo', 'th', 'simple', 'zh-min-nan', 'cy', - 'scn', 'sr', 'af', 'ast', 'ps', 'sw', 'fy', 'tl', 'nn', 'he', 'ur', - 'da', 'uz', 'wa', 'la', 'hy', 'sq', 'sm', 'sl', 'hi', 'nah', 'az', - 'tt', 'pnb', 'ka', 'lv', 'bs', 'lb', 'tk', 'hsb', 'kk', 'sk', 'km', - 'mk', 'be', 'ga', 'wo', 'ms', 'ang', 'ky', 'nds', 'co', 'gn', 'mr', - 'csb', 'st', 'ia', 'si', 'sh', 'sd', 'tg', 'ug', 'mn', 'sa', 'kl', + 'scn', 'sr', 'af', 'ps', 'ast', 'sw', 'fy', 'tl', 'nn', 'he', 'ur', + 'da', 'uz', 'wa', 'la', 'hy', 'sq', 'sm', 'sl', 'hi', 'nah', 'ka', + 'az', 'pnb', 'tt', 'bs', 'lv', 'lb', 'tk', 'hsb', 'kk', 'sk', 'km', + 'mk', 'be', 'ga', 'wo', 'ms', 'nds', 'ang', 'ky', 'co', 'gn', 'mr', + 'csb', 'st', 'ia', 'sd', 'si', 'sh', 'tg', 'ug', 'sa', 'mn', 'kl', 'jbo', 'an', 'ln', 'zu', 'or', 'gu', 'kw', 'rw', 'gv', 'fo', 'qu', 'ss', 'ie', 'mt', 'om', 'chr', 'roa-rup', 'iu', 'bn', 'pa', 'so', 'am', 'su', 'za', 'gd', 'mi', 'tpi', 'ne', 'yi', 'ti', 'sg', 'na',
1
0
0
0
SVN: [11414] branches/rewrite/pywikibot/textlib.py
by xqt@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11414
Revision: 11414 Author: xqt Date: 2013-04-21 15:58:42 +0000 (Sun, 21 Apr 2013) Log Message: ----------- Templates may contain curling brackets, bugfix for bug #3021792, update from trunk r11413 Modified Paths: -------------- branches/rewrite/pywikibot/textlib.py Modified: branches/rewrite/pywikibot/textlib.py =================================================================== --- branches/rewrite/pywikibot/textlib.py 2013-04-21 15:45:32 UTC (rev 11413) +++ branches/rewrite/pywikibot/textlib.py 2013-04-21 15:58:42 UTC (rev 11414) @@ -19,7 +19,8 @@ from HTMLParser import HTMLParser import config2 as config -TEMP_REGEX = re.compile('{{(msg:)?(?P<name>[^{\|]+?)(\|(?P<params>[^{]+?))?}}') +TEMP_REGEX = re.compile( + '{{(?:msg:)?(?P<name>[^{\|]+?)(?:\|(?P<params>[^{]+?(?:{[^{]+?}[^{]*?)?))?}}') def unescape(s): """Replace escaped HTML-special characters by their originals"""
1
0
0
0
SVN: [11413] trunk/pywikipedia/pywikibot/textlib.py
by xqt@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11413
Revision: 11413 Author: xqt Date: 2013-04-21 15:45:32 +0000 (Sun, 21 Apr 2013) Log Message: ----------- Templates may contain curling brackets, bugfix for bug #3021792 Modified Paths: -------------- trunk/pywikipedia/pywikibot/textlib.py Modified: trunk/pywikipedia/pywikibot/textlib.py =================================================================== --- trunk/pywikipedia/pywikibot/textlib.py 2013-04-21 13:07:03 UTC (rev 11412) +++ trunk/pywikipedia/pywikibot/textlib.py 2013-04-21 15:45:32 UTC (rev 11413) @@ -19,7 +19,8 @@ from HTMLParser import HTMLParser import config -TEMP_REGEX = re.compile('{{(msg:)?(?P<name>[^{\|]+?)(\|(?P<params>[^{]+?))?}}') +TEMP_REGEX = re.compile( + '{{(?:msg:)?(?P<name>[^{\|]+?)(?:\|(?P<params>[^{]+?(?:{[^{]+?}[^{]*?)?))?}}') def unescape(s): """Replace escaped HTML-special characters by their originals"""
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
517
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
Results per page:
10
25
50
100
200