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
April 2013
----- 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
9 participants
175 discussions
Start a n
N
ew thread
SVN: [11426] branches/rewrite/pywikibot/bot.py
by drtrigon@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11426
Revision: 11426 Author: drtrigon Date: 2013-04-21 20:16:36 +0000 (Sun, 21 Apr 2013) Log Message: ----------- bug fix; use correct output/logging function Modified Paths: -------------- branches/rewrite/pywikibot/bot.py Modified: branches/rewrite/pywikibot/bot.py =================================================================== --- branches/rewrite/pywikibot/bot.py 2013-04-21 19:09:15 UTC (rev 11425) +++ branches/rewrite/pywikibot/bot.py 2013-04-21 20:16:36 UTC (rev 11426) @@ -236,32 +236,32 @@ Save additional version, system and status info to the logfile in use, so that the user can look it up later to track errors or report bugs. """ - logoutput(u'=== Pywikipediabot framework v2.0 -- Logging header ===') + output(u'=== Pywikipediabot framework v2.0 -- Logging header ===') # script call - logoutput(u'COMMAND: %s' % unicode(sys.argv)) + output(u'COMMAND: %s' % unicode(sys.argv)) # new framework release/revision? site = pywikibot.getSite() - logoutput(u'VERSION: %s' % unicode((version.getversion().strip(' ()'), + output(u'VERSION: %s' % unicode((version.getversion().strip(' ()'), version.getversion_onlinerepo(), site.live_version()))) # system if hasattr(os, 'uname'): - logoutput(u'SYSTEM: %s' % unicode(os.uname())) + output(u'SYSTEM: %s' % unicode(os.uname())) # imported modules - #logoutput(u'MODULES:') + #output(u'MODULES:') #for item in sys.modules.keys(): # ver = version.getfileversion('%s.py' % item) # if ver and (ver[0] == u'$'): - # logoutput(u' %s' % ver) + # output(u' %s' % ver) # messages on bot discussion page? - logoutput(u'MESSAGES: %s' % ('unanswered' if site.messages() else 'none')) + output(u'MESSAGES: %s' % ('unanswered' if site.messages() else 'none')) - logoutput(u'=== ' * 14) + output(u'=== ' * 14) # User output/logging functions
1
0
0
0
SVN: [11425] trunk/pywikipedia/clean_sandbox.py
by drtrigon@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11425
Revision: 11425 Author: drtrigon Date: 2013-04-21 19:09:15 +0000 (Sun, 21 Apr 2013) Log Message: ----------- improvement; remove obsolete variable (from rewrite) Modified Paths: -------------- trunk/pywikipedia/clean_sandbox.py Modified: trunk/pywikipedia/clean_sandbox.py =================================================================== --- trunk/pywikipedia/clean_sandbox.py 2013-04-21 19:07:33 UTC (rev 11424) +++ trunk/pywikipedia/clean_sandbox.py 2013-04-21 19:09:15 UTC (rev 11425) @@ -160,28 +160,27 @@ int(time2[10:12]) return abs(t2-t1) - mySite = self.site while True: wait = False now = time.strftime("%d %b %Y %H:%M:%S (UTC)", time.gmtime()) - localSandboxTitle = pywikibot.translate(mySite, sandboxTitle) + localSandboxTitle = pywikibot.translate(self.site, sandboxTitle) if type(localSandboxTitle) is list: titles = localSandboxTitle else: titles = [localSandboxTitle,] for title in titles: - sandboxPage = pywikibot.Page(mySite, title) + sandboxPage = pywikibot.Page(self.site, title) pywikibot.output(u'Preparing to process sandbox page %s' % sandboxPage.title(asLink=True)) try: text = sandboxPage.get() - translatedContent = pywikibot.translate(mySite, content) - translatedMsg = i18n.twtranslate(mySite, + translatedContent = pywikibot.translate(self.site, content) + translatedMsg = i18n.twtranslate(self.site, 'clean_sandbox-cleaned') subst = 'subst:' in translatedContent pos = text.find(translatedContent.strip()) if text.strip() == translatedContent.strip(): pywikibot.output(u'The sandbox is still clean, no change necessary.') - elif subst and sandboxPage.userName() == mySite.loggedInAs(): + elif subst and sandboxPage.userName() == self.site.loggedInAs(): pywikibot.output(u'The sandbox might be clean, no change necessary.') elif pos <> 0 and not subst: if self.user:
1
0
0
0
SVN: [11424] branches/rewrite/scripts/clean_sandbox.py
by drtrigon@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11424
Revision: 11424 Author: drtrigon Date: 2013-04-21 19:07:33 +0000 (Sun, 21 Apr 2013) Log Message: ----------- improvement; remove obsolete variable Modified Paths: -------------- branches/rewrite/scripts/clean_sandbox.py Modified: branches/rewrite/scripts/clean_sandbox.py =================================================================== --- branches/rewrite/scripts/clean_sandbox.py 2013-04-21 19:01:18 UTC (rev 11423) +++ branches/rewrite/scripts/clean_sandbox.py 2013-04-21 19:07:33 UTC (rev 11424) @@ -158,30 +158,28 @@ u'(%s), exiting.' % self.site) sys.exit(0) - def run(self): - mySite = self.site while True: wait = False now = time.strftime("%d %b %Y %H:%M:%S (UTC)", time.gmtime()) - localSandboxTitle = pywikibot.translate(mySite, sandboxTitle) + localSandboxTitle = pywikibot.translate(self.site, sandboxTitle) if type(localSandboxTitle) is list: titles = localSandboxTitle else: titles = [localSandboxTitle,] for title in titles: - sandboxPage = pywikibot.Page(mySite, title) + sandboxPage = pywikibot.Page(self.site, title) pywikibot.output(u'Preparing to process sandbox page %s' % sandboxPage.title(asLink=True)) try: text = sandboxPage.get() - translatedContent = pywikibot.translate(mySite, content) - translatedMsg = i18n.twtranslate(mySite, + translatedContent = pywikibot.translate(self.site, content) + translatedMsg = i18n.twtranslate(self.site, 'clean_sandbox-cleaned') subst = 'subst:' in translatedContent pos = text.find(translatedContent.strip()) if text.strip() == translatedContent.strip(): pywikibot.output(u'The sandbox is still clean, no change necessary.') - elif subst and sandboxPage.userName() == mySite.user(): + elif subst and sandboxPage.userName() == self.site.user(): pywikibot.output(u'The sandbox might be clean, no change necessary.') elif pos <> 0 and not subst: if self.getOption('user'):
1
0
0
0
SVN: [11423] trunk/pywikipedia/families
by xqt@svn.wikimedia.org
21 Apr '13
21 Apr '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11423
Revision: 11423 Author: xqt Date: 2013-04-21 19:01:18 +0000 (Sun, 21 Apr 2013) Log Message: ----------- update namespace aliases Modified Paths: -------------- trunk/pywikipedia/families/wikibooks_family.py trunk/pywikipedia/families/wikinews_family.py trunk/pywikipedia/families/wikiquote_family.py trunk/pywikipedia/families/wikisource_family.py trunk/pywikipedia/families/wikiversity_family.py trunk/pywikipedia/families/wikivoyage_family.py trunk/pywikipedia/families/wiktionary_family.py Modified: trunk/pywikipedia/families/wikibooks_family.py =================================================================== --- trunk/pywikipedia/families/wikibooks_family.py 2013-04-21 18:50:41 UTC (rev 11422) +++ trunk/pywikipedia/families/wikibooks_family.py 2013-04-21 19:01:18 UTC (rev 11423) @@ -25,21 +25,62 @@ for lang in self.languages_by_size]) # Override defaults - self.namespaces[6]['be'] = [u'Файл', u'Выява'] - self.namespaces[7]['be'] = [u'Размовы пра файл', u'Размовы пра выяву'] - self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] - self.namespaces[2]['fr'] = [u'Utilisateur'] self.namespaces[14]['en'] = [u'Category', u'CAT'] self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] self.namespaces[14]['zh'] = [u'Category', u'分类', u'分類'] + self.namespaces[828]['zh'] = [u'模組'] + self.namespaces[3]['ca'] = [u'Usuari Discussió'] + self.namespaces[2]['ca'] = [u'Usuari'] + self.namespaces[829]['ca'] = [u'Mòdul Discussió'] + self.namespaces[828]['ca'] = [u'Mòdul'] + self.namespaces[829]['it'] = [u'Discussioni modulo'] + self.namespaces[828]['it'] = [u'Modulo'] + self.namespaces[829]['eu'] = [u'Modulu eztabaida'] + self.namespaces[828]['eu'] = [u'Modulu'] + self.namespaces[829]['cy'] = [u'Sgwrs modiwl'] + self.namespaces[828]['cy'] = [u'Modiwl'] + self.namespaces[829]['ar'] = [u'نقاش الوحدة'] + self.namespaces[828]['ar'] = [u'وحدة'] + self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] + self.namespaces[829]['et'] = [u'Mooduli arutelu'] + self.namespaces[828]['et'] = [u'Moodul'] + self.namespaces[829]['gl'] = [u'Conversa módulo'] + self.namespaces[829]['id'] = [u'Pembicaraan Modul'] + self.namespaces[828]['id'] = [u'Modul'] + self.namespaces[829]['es'] = [u'Módulo discusión'] + self.namespaces[828]['es'] = [u'Módulo'] + self.namespaces[829]['ru'] = [u'Обсуждение модуля'] + self.namespaces[828]['ru'] = [u'Модуль'] + self.namespaces[12]['nl'] = [u'Help'] 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[3]['ca'] = [u'Usuari Discussió'] - self.namespaces[2]['ca'] = [u'Usuari'] + self.namespaces[829]['tt'] = [u'Обсуждение модуля'] + self.namespaces[828]['tt'] = [u'Модуль'] self.namespaces[14]['tr'] = [u'Kategori', u'KAT'] + self.namespaces[829]['cv'] = [u'Обсуждение модуля'] + self.namespaces[828]['cv'] = [u'Модуль'] + self.namespaces[9]['ro'] = [u'Discuție MediaWiki', u'Discuţie MediaWiki'] + self.namespaces[3]['pl'] = [u'Dyskusja wikipedysty', u'Dyskusja wikipedystki', u'Dyskusja użytkownika', u'Dyskusja użytkowniczki'] + self.namespaces[2]['pl'] = [u'Wikipedysta', u'Wikipedystka', u'Użytkownik', u'Użytkowniczka'] + self.namespaces[829]['pl'] = [u'Dyskusja modułu'] + self.namespaces[828]['pl'] = [u'Moduł'] + self.namespaces[6]['be'] = [u'Файл', u'Выява'] + self.namespaces[7]['be'] = [u'Размовы пра файл', u'Размовы пра выяву'] + self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] + self.namespaces[2]['fr'] = [u'Utilisateur'] + self.namespaces[829]['uk'] = [u'Обговорення модуля'] + self.namespaces[828]['uk'] = [u'Модуль'] + self.namespaces[15]['bn'] = [u'বিষয়শ্রেণী আলোচনা'] + self.namespaces[14]['bn'] = [u'বিষয়শ্রেণী'] + self.namespaces[829]['bn'] = [u'মডিউল আলাপ'] + self.namespaces[828]['bn'] = [u'মডিউল'] self.namespaces[13]['da'] = [u'Hjælp diskussion', u'Hjælp-diskussion'] + self.namespaces[829]['da'] = [u'Moduldiskussion'] + self.namespaces[828]['da'] = [u'Modul'] self.namespaces[9]['da'] = [u'MediaWiki diskussion', u'MediaWiki-diskussion'] + self.namespaces[829]['fa'] = [u'بحث پودمان'] + self.namespaces[828]['fa'] = [u'پودمان'] self.namespaces[11]['hi'] = [u'साँचा वार्ता'] self.namespaces[10]['hi'] = [u'साँचा'] self.namespaces[15]['hi'] = [u'श्रेणी वार्ता'] @@ -48,13 +89,16 @@ self.namespaces[2]['hi'] = [u'सदस्य'] self.namespaces[9]['hi'] = [u'मीडियाविकि वार्ता'] self.namespaces[8]['hi'] = [u'मीडियाविकि'] - self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] - self.namespaces[12]['nl'] = [u'Help'] - self.namespaces[9]['ro'] = [u'Discuție MediaWiki', u'Discuţie MediaWiki'] - self.namespaces[15]['bn'] = [u'বিষয়শ্রেণী আলোচনা'] - self.namespaces[14]['bn'] = [u'বিষয়শ্রেণী'] - self.namespaces[3]['pl'] = [u'Dyskusja wikipedysty', u'Dyskusja wikipedystki', u'Dyskusja użytkownika', u'Dyskusja użytkowniczki'] - self.namespaces[2]['pl'] = [u'Wikipedysta', u'Wikipedystka', u'Użytkownik', u'Użytkowniczka'] + self.namespaces[829]['ja'] = [u'モジュール・トーク'] + self.namespaces[828]['ja'] = [u'モジュール'] + self.namespaces[828]['ka'] = [u'მოდული'] + self.namespaces[829]['ko'] = [u'모듈토론'] + self.namespaces[828]['ko'] = [u'모듈'] + self.namespaces[829]['sk'] = [u'Diskusia k modulu'] + self.namespaces[828]['sk'] = [u'Modul'] + self.namespaces[828]['ms'] = [u'Modul'] + self.namespaces[829]['sl'] = [u'Pogovor o modulu'] + self.namespaces[828]['sl'] = [u'Modul'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. Modified: trunk/pywikipedia/families/wikinews_family.py =================================================================== --- trunk/pywikipedia/families/wikinews_family.py 2013-04-21 18:50:41 UTC (rev 11422) +++ trunk/pywikipedia/families/wikinews_family.py 2013-04-21 19:01:18 UTC (rev 11423) @@ -20,20 +20,41 @@ for lang in self.languages_by_size]) # Override defaults + self.namespaces[829]['ru'] = [u'Обсуждение модуля'] + self.namespaces[828]['ru'] = [u'Модуль'] self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] self.namespaces[2]['fr'] = [u'Utilisateur'] self.namespaces[14]['en'] = [u'Category', u'CAT'] self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] self.namespaces[14]['zh'] = [u'Category', u'分类', u'分類'] + self.namespaces[828]['zh'] = [u'模組'] 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[3]['ca'] = [u'Usuari Discussió'] self.namespaces[2]['ca'] = [u'Usuari'] + self.namespaces[829]['ca'] = [u'Mòdul Discussió'] + self.namespaces[828]['ca'] = [u'Mòdul'] + self.namespaces[829]['ko'] = [u'모듈토론'] + self.namespaces[828]['ko'] = [u'모듈'] + self.namespaces[829]['it'] = [u'Discussioni modulo'] + self.namespaces[828]['it'] = [u'Modulo'] + self.namespaces[829]['fa'] = [u'بحث پودمان'] + self.namespaces[828]['fa'] = [u'پودمان'] + self.namespaces[829]['ar'] = [u'نقاش الوحدة'] + self.namespaces[828]['ar'] = [u'وحدة'] + self.namespaces[3]['pl'] = [u'Dyskusja wikireportera', u'Dyskusja wikireporterki'] + self.namespaces[2]['pl'] = [u'Wikireporter', u'Wikireporterka'] + self.namespaces[829]['pl'] = [u'Dyskusja modułu'] + self.namespaces[828]['pl'] = [u'Moduł'] + self.namespaces[829]['uk'] = [u'Обговорення модуля'] + self.namespaces[828]['uk'] = [u'Модуль'] self.namespaces[3]['cs'] = [u'Diskuse s redaktorem', u'Diskuse s redaktorkou', u'Diskuse s uživatelem', u'Redaktor diskuse', u'Redaktorka diskuse', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] self.namespaces[2]['cs'] = [u'Redaktor', u'Redaktorka', u'Uživatel', u'Uživatelka'] - self.namespaces[3]['pl'] = [u'Dyskusja wikireportera', u'Dyskusja wikireporterki'] - self.namespaces[2]['pl'] = [u'Wikireporter', u'Wikireporterka'] + self.namespaces[829]['ja'] = [u'モジュール・トーク'] + self.namespaces[828]['ja'] = [u'モジュール'] + self.namespaces[829]['es'] = [u'Módulo discusión'] + self.namespaces[828]['es'] = [u'Módulo'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. Modified: trunk/pywikipedia/families/wikiquote_family.py =================================================================== --- trunk/pywikipedia/families/wikiquote_family.py 2013-04-21 18:50:41 UTC (rev 11422) +++ trunk/pywikipedia/families/wikiquote_family.py 2013-04-21 19:01:18 UTC (rev 11423) @@ -24,18 +24,51 @@ for lang in self.languages_by_size]) # Override defaults + self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] + self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] + self.namespaces[14]['zh'] = [u'Category', u'分类', u'分類'] + self.namespaces[828]['zh'] = [u'模組'] + self.namespaces[829]['ca'] = [u'Mòdul Discussió'] + self.namespaces[828]['ca'] = [u'Mòdul'] + self.namespaces[3]['ca'] = [u'Usuari Discussió'] + self.namespaces[2]['ca'] = [u'Usuari'] + self.namespaces[829]['it'] = [u'Discussioni modulo'] + self.namespaces[828]['it'] = [u'Modulo'] + self.namespaces[829]['eu'] = [u'Modulu eztabaida'] + self.namespaces[828]['eu'] = [u'Modulu'] + self.namespaces[829]['cy'] = [u'Sgwrs modiwl'] + self.namespaces[828]['cy'] = [u'Modiwl'] + self.namespaces[829]['ar'] = [u'نقاش الوحدة'] + self.namespaces[828]['ar'] = [u'وحدة'] + self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] + self.namespaces[829]['et'] = [u'Mooduli arutelu'] + self.namespaces[828]['et'] = [u'Moodul'] + self.namespaces[829]['gl'] = [u'Conversa módulo'] + self.namespaces[829]['id'] = [u'Pembicaraan Modul'] + self.namespaces[828]['id'] = [u'Modul'] + self.namespaces[829]['es'] = [u'Módulo discusión'] + self.namespaces[828]['es'] = [u'Módulo'] + self.namespaces[829]['ru'] = [u'Обсуждение модуля'] + self.namespaces[828]['ru'] = [u'Модуль'] + self.namespaces[12]['nl'] = [u'Help'] + 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[9]['ro'] = [u'Discuție MediaWiki', u'Discuţie MediaWiki'] + self.namespaces[829]['pl'] = [u'Dyskusja modułu'] + self.namespaces[828]['pl'] = [u'Moduł'] + self.namespaces[3]['pl'] = [u'Dyskusja użytkownika', u'Dyskusja użytkowniczki'] + self.namespaces[2]['pl'] = [u'Użytkownik', u'Użytkowniczka'] self.namespaces[6]['be'] = [u'Файл', u'Выява'] self.namespaces[7]['be'] = [u'Размовы пра файл', u'Размовы пра выяву'] self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] self.namespaces[2]['fr'] = [u'Utilisateur'] - self.namespaces[12]['nl'] = [u'Help'] - 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[3]['ca'] = [u'Usuari Discussió'] - self.namespaces[2]['ca'] = [u'Usuari'] self.namespaces[3]['de'] = [u'Benutzer Diskussion', u'BD', u'Benutzerin Diskussion'] self.namespaces[13]['da'] = [u'Hjælp diskussion', u'Hjælp-diskussion'] + self.namespaces[829]['da'] = [u'Moduldiskussion'] + self.namespaces[828]['da'] = [u'Modul'] self.namespaces[9]['da'] = [u'MediaWiki diskussion', u'MediaWiki-diskussion'] + self.namespaces[829]['fa'] = [u'بحث پودمان'] + self.namespaces[828]['fa'] = [u'پودمان'] self.namespaces[11]['hi'] = [u'साँचा वार्ता'] self.namespaces[10]['hi'] = [u'साँचा'] self.namespaces[15]['hi'] = [u'श्रेणी वार्ता'] @@ -44,13 +77,21 @@ self.namespaces[2]['hi'] = [u'सदस्य'] self.namespaces[9]['hi'] = [u'मीडियाविकि वार्ता'] self.namespaces[8]['hi'] = [u'मीडियाविकि'] - self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] - self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] - self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] - self.namespaces[14]['zh'] = [u'Category', 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'] + self.namespaces[829]['ja'] = [u'モジュール・トーク'] + self.namespaces[828]['ja'] = [u'モジュール'] + self.namespaces[828]['ka'] = [u'მოდული'] + self.namespaces[829]['nn'] = [u'Moduldiskusjon'] + self.namespaces[828]['nn'] = [u'Modul'] + self.namespaces[829]['ko'] = [u'모듈토론'] + self.namespaces[828]['ko'] = [u'모듈'] + self.namespaces[829]['su'] = [u'Pembicaraan Modul'] + self.namespaces[828]['su'] = [u'Modul'] + self.namespaces[829]['sk'] = [u'Diskusia k modulu'] + self.namespaces[828]['sk'] = [u'Modul'] + self.namespaces[829]['uk'] = [u'Обговорення модуля'] + self.namespaces[828]['uk'] = [u'Модуль'] + self.namespaces[829]['sl'] = [u'Pogovor o modulu'] + self.namespaces[828]['sl'] = [u'Modul'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. Modified: trunk/pywikipedia/families/wikisource_family.py =================================================================== --- trunk/pywikipedia/families/wikisource_family.py 2013-04-21 18:50:41 UTC (rev 11422) +++ trunk/pywikipedia/families/wikisource_family.py 2013-04-21 19:01:18 UTC (rev 11423) @@ -24,29 +24,69 @@ self.langs['-'] = '
wikisource.org
' # Override defaults + self.namespaces[829]['sah'] = [u'Обсуждение модуля'] + self.namespaces[828]['sah'] = [u'Модуль'] self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] self.namespaces[14]['zh'] = [u'Category', u'分类', u'分類'] + self.namespaces[828]['zh'] = [u'模組'] self.namespaces[3]['ca'] = [u'Usuari Discussió'] self.namespaces[2]['ca'] = [u'Usuari'] + self.namespaces[829]['ca'] = [u'Mòdul Discussió'] + self.namespaces[828]['ca'] = [u'Mòdul'] + self.namespaces[829]['it'] = [u'Discussioni modulo'] + self.namespaces[828]['it'] = [u'Modulo'] self.namespaces[14]['as'] = [u'শ্ৰেণী', u'श्रेणी', u'শ্রেণী'] + self.namespaces[829]['ar'] = [u'نقاش الوحدة'] + self.namespaces[828]['ar'] = [u'وحدة'] self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] + self.namespaces[829]['et'] = [u'Mooduli arutelu'] + self.namespaces[828]['et'] = [u'Moodul'] + self.namespaces[829]['gl'] = [u'Conversa módulo'] + self.namespaces[829]['id'] = [u'Pembicaraan Modul'] + self.namespaces[828]['id'] = [u'Modul'] + self.namespaces[829]['es'] = [u'Módulo discusión'] + self.namespaces[828]['es'] = [u'Módulo'] + self.namespaces[829]['ru'] = [u'Обсуждение модуля'] + self.namespaces[828]['ru'] = [u'Модуль'] self.namespaces[12]['nl'] = [u'Help'] 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[6]['vec'] = [u'File', u'Imagine'] + self.namespaces[829]['vec'] = [u'Discussioni modulo'] + self.namespaces[828]['vec'] = [u'Modulo'] self.namespaces[9]['ro'] = [u'Discuție MediaWiki', u'Discuţie MediaWiki'] self.namespaces[3]['pl'] = [u'Dyskusja wikiskryby', u'Dyskusja użytkownika', u'Dyskusja użytkowniczki'] self.namespaces[2]['pl'] = [u'Wikiskryba', u'Użytkownik', u'Użytkowniczka'] + self.namespaces[829]['pl'] = [u'Dyskusja modułu'] + self.namespaces[828]['pl'] = [u'Moduł'] self.namespaces[7]['be'] = [u'Размовы пра файл', u'Размовы пра выяву'] self.namespaces[6]['be'] = [u'Файл', u'Выява'] self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] self.namespaces[2]['fr'] = [u'Utilisateur'] + self.namespaces[829]['sl'] = [u'Pogovor o modulu'] + self.namespaces[828]['sl'] = [u'Modul'] self.namespaces[15]['bn'] = [u'বিষয়শ্রেণী আলোচনা'] self.namespaces[14]['bn'] = [u'বিষয়শ্রেণী'] + self.namespaces[829]['bn'] = [u'মডিউল আলাপ'] + self.namespaces[828]['bn'] = [u'মডিউল'] + self.namespaces[829]['fa'] = [u'بحث پودمان'] + self.namespaces[828]['fa'] = [u'پودمان'] self.namespaces[9]['da'] = [u'MediaWiki diskussion', u'MediaWiki-diskussion'] self.namespaces[13]['da'] = [u'Hjælp diskussion', u'Hjælp-diskussion'] + self.namespaces[829]['da'] = [u'Moduldiskussion'] + self.namespaces[828]['da'] = [u'Modul'] + self.namespaces[829]['ja'] = [u'モジュール・トーク'] + self.namespaces[828]['ja'] = [u'モジュール'] self.namespaces[12]['ml'] = [u'സഹായം', u'H', u'സ'] + self.namespaces[829]['ko'] = [u'모듈토론'] + self.namespaces[828]['ko'] = [u'모듈'] + self.namespaces[829]['sk'] = [u'Diskusia k modulu'] + self.namespaces[828]['sk'] = [u'Modul'] + self.namespaces[829]['uk'] = [u'Обговорення модуля'] + self.namespaces[828]['uk'] = [u'Модуль'] + self.namespaces[829]['cy'] = [u'Sgwrs modiwl'] + self.namespaces[828]['cy'] = [u'Modiwl'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. Modified: trunk/pywikipedia/families/wikiversity_family.py =================================================================== --- trunk/pywikipedia/families/wikiversity_family.py 2013-04-21 18:50:41 UTC (rev 11422) +++ trunk/pywikipedia/families/wikiversity_family.py 2013-04-21 19:01:18 UTC (rev 11423) @@ -19,11 +19,25 @@ for lang in self.languages_by_size]) # Override defaults - self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] + self.namespaces[829]['ru'] = [u'Обсуждение модуля'] + self.namespaces[828]['ru'] = [u'Модуль'] self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] self.namespaces[2]['fr'] = [u'Utilisateur'] 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[829]['ko'] = [u'모듈토론'] + self.namespaces[828]['ko'] = [u'모듈'] + self.namespaces[829]['it'] = [u'Discussioni modulo'] + self.namespaces[828]['it'] = [u'Modulo'] + self.namespaces[829]['ar'] = [u'نقاش الوحدة'] + self.namespaces[828]['ar'] = [u'وحدة'] + self.namespaces[829]['sl'] = [u'Pogovor o modulu'] + self.namespaces[828]['sl'] = [u'Modul'] + self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] + self.namespaces[829]['ja'] = [u'モジュール・トーク'] + self.namespaces[828]['ja'] = [u'モジュール'] + self.namespaces[829]['es'] = [u'Módulo discusión'] + self.namespaces[828]['es'] = [u'Módulo'] # 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 18:50:41 UTC (rev 11422) +++ trunk/pywikipedia/families/wikivoyage_family.py 2013-04-21 19:01:18 UTC (rev 11423) @@ -19,16 +19,26 @@ for lang in self.languages_by_size]) # Override defaults + self.namespaces[829]['ru'] = [u'Обсуждение модуля'] + self.namespaces[828]['ru'] = [u'Модуль'] self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] self.namespaces[2]['fr'] = [u'Utilisateur'] self.namespaces[12]['nl'] = [u'Help'] 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[829]['it'] = [u'Discussioni modulo'] + self.namespaces[828]['it'] = [u'Modulo'] + self.namespaces[829]['pl'] = [u'Dyskusja modułu'] + self.namespaces[828]['pl'] = [u'Moduł'] + self.namespaces[3]['pl'] = [u'Dyskusja użytkownika', u'Dyskusja użytkowniczki'] + self.namespaces[2]['pl'] = [u'Użytkownik', u'Użytkowniczka'] self.namespaces[12]['uk'] = [u'Довідка', u'Д'] self.namespaces[14]['uk'] = [u'Категорія', u'К'] + self.namespaces[829]['uk'] = [u'Обговорення модуля'] + self.namespaces[828]['uk'] = [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'] + self.namespaces[829]['es'] = [u'Módulo discusión'] + self.namespaces[828]['es'] = [u'Módulo'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. Modified: trunk/pywikipedia/families/wiktionary_family.py =================================================================== --- trunk/pywikipedia/families/wiktionary_family.py 2013-04-21 18:50:41 UTC (rev 11422) +++ trunk/pywikipedia/families/wiktionary_family.py 2013-04-21 19:01:18 UTC (rev 11423) @@ -31,21 +31,72 @@ for lang in self.languages_by_size]) # Override defaults - self.namespaces[6]['be'] = [u'Файл', u'Выява'] - self.namespaces[7]['be'] = [u'Размовы пра файл', u'Размовы пра выяву'] self.namespaces[3]['eo'] = [u'Uzanta diskuto', u'Vikipediista diskuto', u'Uzula diskuto'] + self.namespaces[829]['scn'] = [u'Discussioni modulo'] + self.namespaces[828]['scn'] = [u'Modulo'] self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] self.namespaces[14]['zh'] = [u'Category', u'分类', u'分類'] + self.namespaces[828]['zh'] = [u'模組'] + self.namespaces[829]['ca'] = [u'Mòdul Discussió'] + self.namespaces[828]['ca'] = [u'Mòdul'] + self.namespaces[3]['ca'] = [u'Usuari Discussió'] + self.namespaces[2]['ca'] = [u'Usuari'] + self.namespaces[829]['it'] = [u'Discussioni modulo'] + self.namespaces[828]['it'] = [u'Modulo'] + self.namespaces[829]['an'] = [u'Descusión modulo'] + self.namespaces[828]['an'] = [u'Modulo'] + self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] + self.namespaces[829]['cy'] = [u'Sgwrs modiwl'] + self.namespaces[828]['cy'] = [u'Modiwl'] + self.namespaces[829]['ar'] = [u'نقاش الوحدة'] + self.namespaces[828]['ar'] = [u'وحدة'] + self.namespaces[829]['gn'] = [u'Módulo discusión'] + self.namespaces[828]['gn'] = [u'Módulo'] + self.namespaces[829]['eu'] = [u'Modulu eztabaida'] + self.namespaces[828]['eu'] = [u'Modulu'] + self.namespaces[829]['et'] = [u'Mooduli arutelu'] + self.namespaces[828]['et'] = [u'Moodul'] + self.namespaces[829]['gl'] = [u'Conversa módulo'] + self.namespaces[829]['id'] = [u'Pembicaraan Modul'] + self.namespaces[828]['id'] = [u'Modul'] + self.namespaces[829]['es'] = [u'Módulo discusión'] + self.namespaces[828]['es'] = [u'Módulo'] + self.namespaces[829]['ru'] = [u'Обсуждение модуля'] + self.namespaces[828]['ru'] = [u'Модуль'] + self.namespaces[12]['nl'] = [u'Help'] 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[829]['tt'] = [u'Обсуждение модуля'] + self.namespaces[828]['tt'] = [u'Модуль'] + self.namespaces[829]['csb'] = [u'Dyskusja modułu'] + self.namespaces[828]['csb'] = [u'Moduł'] + self.namespaces[9]['ro'] = [u'Discuție MediaWiki', u'Discuţie MediaWiki'] self.namespaces[15]['bn'] = [u'বিষয়শ্রেণী আলোচনা'] self.namespaces[14]['bn'] = [u'বিষয়শ্রেণী'] - self.namespaces[3]['de'] = [u'Benutzer Diskussion', u'BD', u'Benutzerin Diskussion'] + self.namespaces[829]['bn'] = [u'মডিউল আলাপ'] + self.namespaces[828]['bn'] = [u'মডিউল'] + self.namespaces[829]['pl'] = [u'Dyskusja modułu'] + self.namespaces[828]['pl'] = [u'Moduł'] + self.namespaces[6]['be'] = [u'Файл', u'Выява'] + self.namespaces[7]['be'] = [u'Размовы пра файл', u'Размовы пра выяву'] self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] self.namespaces[2]['fr'] = [u'Utilisateur'] + self.namespaces[829]['uk'] = [u'Обговорення модуля'] + self.namespaces[828]['uk'] = [u'Модуль'] + self.namespaces[829]['ast'] = [u'Alderique módulu'] + self.namespaces[828]['ast'] = [u'Módulu'] + self.namespaces[829]['jv'] = [u'Pembicaraan Modul'] + self.namespaces[828]['jv'] = [u'Modul'] + self.namespaces[3]['de'] = [u'Benutzer Diskussion', u'BD', u'Benutzerin Diskussion'] self.namespaces[13]['da'] = [u'Hjælp diskussion', u'Hjælp-diskussion'] + self.namespaces[829]['da'] = [u'Moduldiskussion'] + self.namespaces[828]['da'] = [u'Modul'] self.namespaces[9]['da'] = [u'MediaWiki diskussion', u'MediaWiki-diskussion'] + self.namespaces[829]['fa'] = [u'بحث پودمان'] + self.namespaces[828]['fa'] = [u'پودمان'] + self.namespaces[829]['ay'] = [u'Módulo discusión'] + self.namespaces[828]['ay'] = [u'Módulo'] self.namespaces[11]['hi'] = [u'साँचा वार्ता'] self.namespaces[10]['hi'] = [u'साँचा'] self.namespaces[15]['hi'] = [u'श्रेणी वार्ता'] @@ -54,11 +105,28 @@ self.namespaces[2]['hi'] = [u'सदस्य'] self.namespaces[9]['hi'] = [u'मीडियाविकि वार्ता'] self.namespaces[8]['hi'] = [u'मीडियाविकि'] - self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] - self.namespaces[12]['nl'] = [u'Help'] - self.namespaces[9]['ro'] = [u'Discuție MediaWiki', u'Discuţie MediaWiki'] - self.namespaces[3]['ca'] = [u'Usuari Discussió'] - self.namespaces[2]['ca'] = [u'Usuari'] + self.namespaces[829]['dv'] = [u'މޮޑިއުލް ޚިޔާލު'] + self.namespaces[828]['dv'] = [u'މޮޑިއުލް'] + self.namespaces[829]['ja'] = [u'モジュール・トーク'] + self.namespaces[828]['ja'] = [u'モジュール'] + self.namespaces[828]['ka'] = [u'მოდული'] + self.namespaces[829]['qu'] = [u'Módulo discusión'] + self.namespaces[828]['qu'] = [u'Módulo'] + self.namespaces[829]['nn'] = [u'Moduldiskusjon'] + self.namespaces[828]['nn'] = [u'Modul'] + self.namespaces[829]['ko'] = [u'모듈토론'] + self.namespaces[828]['ko'] = [u'모듈'] + self.namespaces[829]['su'] = [u'Pembicaraan Modul'] + self.namespaces[828]['su'] = [u'Modul'] + self.namespaces[829]['kl'] = [u'Moduldiskussion'] + self.namespaces[828]['kl'] = [u'Modul'] + self.namespaces[829]['sk'] = [u'Diskusia k modulu'] + self.namespaces[828]['sk'] = [u'Modul'] + self.namespaces[828]['ms'] = [u'Modul'] + self.namespaces[829]['sl'] = [u'Pogovor o modulu'] + self.namespaces[828]['sl'] = [u'Modul'] + self.namespaces[829]['nah'] = [u'Módulo discusión'] + self.namespaces[828]['nah'] = [u'Módulo'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces.
1
0
0
0
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
← Newer
1
...
4
5
6
7
8
9
10
...
18
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Results per page:
10
25
50
100
200