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
List overview
Download
Pywikibot-commits
September 2019
----- 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
pywikibot-commits@lists.wikimedia.org
1 participants
62 discussions
Start a n
N
ew thread
[Gerrit] pywikibot/core[master]: [L10N] Update languages_by_size
by jenkins-bot (Code Review)
01 Sep '19
01 Sep '19
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/533752
) Change subject: [L10N] Update languages_by_size ...................................................................... [L10N] Update languages_by_size Change-Id: Id41e50f15b8f2960e33683c4f080f24f7e437ef3 --- M pywikibot/families/wikinews_family.py M pywikibot/families/wikipedia_family.py M pywikibot/families/wikiquote_family.py M pywikibot/families/wikisource_family.py M pywikibot/families/wiktionary_family.py 5 files changed, 28 insertions(+), 28 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/families/wikinews_family.py b/pywikibot/families/wikinews_family.py index f312b77..3f27590 100644 --- a/pywikibot/families/wikinews_family.py +++ b/pywikibot/families/wikinews_family.py @@ -23,7 +23,7 @@ ] languages_by_size = [ - 'sr', 'en', 'fr', 'ru', 'pt', 'de', 'pl', 'es', 'zh', 'it', 'ar', 'cs', + 'sr', 'en', 'fr', 'ru', 'pl', 'pt', 'de', 'es', 'zh', 'it', 'ar', 'cs', 'ca', 'nl', 'el', 'ta', 'sv', 'uk', 'bg', 'fa', 'ro', 'fi', 'tr', 'ja', 'li', 'sq', 'no', 'eo', 'ko', 'bs', 'he', ] diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py index 3a7b93d..5d9331c 100644 --- a/pywikibot/families/wikipedia_family.py +++ b/pywikibot/families/wikipedia_family.py @@ -31,32 +31,32 @@ languages_by_size = [ 'en', 'ceb', 'sv', 'de', 'fr', 'nl', 'ru', 'it', 'es', 'pl', 'war', - 'vi', 'ja', 'zh', 'pt', 'uk', 'ar', 'fa', 'sr', 'ca', 'no', 'id', 'fi', + 'vi', 'ja', 'zh', 'pt', 'ar', 'uk', 'fa', 'sr', 'ca', 'no', 'id', 'fi', 'ko', 'hu', 'sh', 'cs', 'ro', 'eu', 'tr', 'ms', 'eo', 'hy', 'bg', 'da', 'he', 'sk', 'zh-min-nan', 'kk', 'min', 'ce', 'hr', 'et', 'lt', 'be', - 'el', 'sl', 'gl', 'azb', 'nn', 'az', 'simple', 'ur', 'th', 'hi', 'uz', - 'ka', 'la', 'ta', 'vo', 'cy', 'mk', 'ast', 'tg', 'lv', 'mg', 'tt', - 'oc', 'af', 'bs', 'ky', 'sq', 'tl', 'zh-yue', 'new', 'bn', 'te', - 'be-tarask', 'br', 'ml', 'pms', 'lb', 'jv', 'ht', 'sco', 'mr', 'nds', - 'sw', 'su', 'ga', 'ba', 'is', 'pnb', 'my', 'fy', 'cv', 'lmo', 'an', - 'ne', 'yo', 'pa', 'io', 'gu', 'bar', 'ku', 'als', 'scn', 'bpy', 'kn', + 'el', 'sl', 'gl', 'azb', 'nn', 'az', 'simple', 'ur', 'th', 'hi', 'ka', + 'uz', 'la', 'ta', 'vo', 'cy', 'mk', 'ast', 'tg', 'lv', 'mg', 'tt', + 'oc', 'af', 'bs', 'ky', 'sq', 'tl', 'zh-yue', 'bn', 'new', 'te', + 'be-tarask', 'br', 'ml', 'pms', 'su', 'lb', 'ht', 'jv', 'sco', 'mr', + 'nds', 'sw', 'ga', 'ba', 'is', 'pnb', 'my', 'fy', 'cv', 'lmo', 'an', + 'ne', 'yo', 'pa', 'bar', 'io', 'gu', 'ku', 'als', 'scn', 'bpy', 'kn', 'ckb', 'ia', 'qu', 'wuu', 'arz', 'mn', 'bat-smg', 'wa', 'si', 'or', - 'gd', 'yi', 'am', 'cdo', 'nap', 'bug', 'hsb', 'mai', 'map-bms', 'fo', - 'mzn', 'xmf', 'ilo', 'li', 'vec', 'eml', 'sah', 'sd', 'os', 'sa', - 'diq', 'ps', 'mrj', 'mhr', 'zh-classical', 'hif', 'roa-tara', 'bcl', - 'frr', 'nv', 'ace', 'hak', 'pam', 'szl', 'nso', 'se', 'km', 'hyw', + 'am', 'gd', 'yi', 'cdo', 'nap', 'bug', 'hsb', 'mai', 'map-bms', 'fo', + 'ilo', 'xmf', 'mzn', 'li', 'vec', 'eml', 'sd', 'sah', 'os', 'sa', + 'diq', 'ps', 'mrj', 'mhr', 'zh-classical', 'hif', 'nv', 'roa-tara', + 'ace', 'bcl', 'frr', 'hak', 'pam', 'szl', 'nso', 'se', 'km', 'hyw', 'rue', 'mi', 'nah', 'vls', 'bh', 'nds-nl', 'crh', 'gan', 'vep', 'sc', - 'ab', 'bo', 'as', 'myv', 'glk', 'co', 'tk', 'so', 'fiu-vro', 'lrc', - 'kv', 'csb', 'shn', 'gv', 'sn', 'udm', 'zea', 'ay', 'ie', 'pcd', 'nrm', - 'ug', 'kab', 'stq', 'lez', 'kw', 'lad', 'mwl', 'ha', 'gom', 'gn', - 'haw', 'rm', 'lij', 'lfn', 'koi', 'lo', 'mt', 'frp', 'fur', 'dsb', - 'ext', 'ln', 'ang', 'dty', 'olo', 'cbk-zam', 'dv', 'ksh', 'gag', 'bjn', - 'pi', 'pag', 'pfl', 'av', 'bxr', 'gor', 'xal', 'krc', 'za', 'pap', + 'ab', 'bo', 'as', 'myv', 'glk', 'co', 'tk', 'fiu-vro', 'so', 'lrc', + 'csb', 'kv', 'shn', 'gv', 'sn', 'udm', 'zea', 'ay', 'ie', 'pcd', 'nrm', + 'ug', 'kab', 'stq', 'lez', 'kw', 'lad', 'ha', 'mwl', 'gom', 'gn', + 'haw', 'rm', 'lij', 'lfn', 'lo', 'koi', 'mt', 'frp', 'fur', 'dsb', + 'ext', 'ang', 'ln', 'dty', 'olo', 'cbk-zam', 'dv', 'ksh', 'bjn', 'gag', + 'pi', 'pfl', 'pag', 'av', 'bxr', 'gor', 'xal', 'krc', 'za', 'pap', 'kaa', 'pdc', 'tyv', 'rw', 'to', 'kl', 'nov', 'arc', 'jam', 'kbp', 'kbd', 'tpi', 'tet', 'ig', 'ki', 'zu', 'na', 'wo', 'jbo', 'roa-rup', - 'lbe', 'bi', 'ty', 'kg', 'mdf', 'lg', 'tcy', 'srn', 'sat', 'inh', 'xh', - 'atj', 'ltg', 'chr', 'sm', 'pih', 'om', 'tn', 'cu', 'ak', 'tw', 'rmy', - 'bm', 'ts', 'chy', 'rn', 'st', 'got', 'tum', 'ny', 'ch', 'ss', 'pnt', + 'lbe', 'bi', 'ty', 'kg', 'mdf', 'lg', 'sat', 'tcy', 'srn', 'inh', 'xh', + 'atj', 'ltg', 'chr', 'sm', 'pih', 'om', 'tn', 'ak', 'cu', 'tw', 'ts', + 'rmy', 'bm', 'st', 'chy', 'rn', 'got', 'tum', 'ny', 'ch', 'ss', 'pnt', 'fj', 'iu', 'ady', 've', 'ee', 'ks', 'ik', 'sg', 'ff', 'dz', 'ti', 'din', 'cr', ] diff --git a/pywikibot/families/wikiquote_family.py b/pywikibot/families/wikiquote_family.py index c6c1642..d8458ea 100644 --- a/pywikibot/families/wikiquote_family.py +++ b/pywikibot/families/wikiquote_family.py @@ -34,7 +34,7 @@ 'he', 'bs', 'ca', 'fi', 'tr', 'th', 'sl', 'lt', 'az', 'bg', 'zh', 'eo', 'hy', 'hr', 'el', 'su', 'nn', 'id', 'ar', 'sv', 'hu', 'li', 'ko', 'nl', 'et', 'ja', 'la', 'sr', 'sah', 'ta', 'gu', 'gl', 'ur', 'te', 'cy', - 'be', 'vi', 'no', 'ml', 'kn', 'ro', 'ku', 'eu', 'sq', 'hi', 'ka', 'da', + 'be', 'no', 'ml', 'vi', 'kn', 'ro', 'ku', 'eu', 'sq', 'hi', 'ka', 'da', 'sa', 'is', 'br', 'mr', 'af', 'uz', 'wo', 'ky', ] diff --git a/pywikibot/families/wikisource_family.py b/pywikibot/families/wikisource_family.py index babe9fa..bf09879 100644 --- a/pywikibot/families/wikisource_family.py +++ b/pywikibot/families/wikisource_family.py @@ -33,7 +33,7 @@ 'hy', 'sl', 'te', 'el', 'ro', 'fi', 'ja', 'vi', 'nap', 'az', 'ta', 'th', 'ca', 'br', 'nl', 'kn', 'hr', 'la', 'no', 'is', 'eo', 'vec', 'tr', 'pms', 'be', 'et', 'da', 'mk', 'id', 'yi', 'bg', 'li', 'as', - 'mr', 'or', 'gl', 'bs', 'sah', 'lt', 'sk', 'pa', 'eu', 'cy', + 'mr', 'or', 'gl', 'bs', 'sah', 'lt', 'eu', 'sk', 'pa', 'cy', 'zh-min-nan', 'fo', ] diff --git a/pywikibot/families/wiktionary_family.py b/pywikibot/families/wiktionary_family.py index b9b98b2..eff9a99 100644 --- a/pywikibot/families/wiktionary_family.py +++ b/pywikibot/families/wiktionary_family.py @@ -35,13 +35,13 @@ 'lt', 'it', 'el', 'ca', 'fi', 'hu', 'ta', 'tr', 'hy', 'io', 'ko', 'kn', 'pt', 'vi', 'sr', 'ja', 'chr', 'th', 'hi', 'ro', 'no', 'id', 'et', 'ml', 'my', 'uz', 'li', 'cs', 'or', 'te', 'eo', 'fa', 'ar', 'jv', 'az', - 'eu', 'gl', 'oc', 'br', 'uk', 'da', 'lo', 'hr', 'fj', 'tg', 'ky', 'bg', - 'la', 'sk', 'simple', 'ast', 'ps', 'ur', 'wa', 'is', 'cy', 'vo', - 'zh-min-nan', 'af', 'he', 'scn', 'tl', 'pa', 'sw', 'fy', 'nn', 'lv', - 'bn', 'sq', 'co', 'ka', 'mn', 'pnb', 'nds', 'sl', 'lb', 'bs', 'nah', + 'gl', 'eu', 'oc', 'br', 'uk', 'da', 'lo', 'hr', 'fj', 'tg', 'ky', 'la', + 'bg', 'sk', 'ast', 'simple', 'ps', 'ur', 'is', 'wa', 'cy', 'vo', + 'zh-min-nan', 'af', 'he', 'scn', 'tl', 'pa', 'sw', 'fy', 'nn', 'bn', + 'lv', 'sq', 'co', 'ka', 'mn', 'pnb', 'nds', 'sl', 'lb', 'bs', 'nah', 'sa', 'kk', 'tk', 'sm', 'km', 'mk', 'hsb', 'ms', 'be', 'vec', 'yue', 'ga', 'an', 'wo', 'ang', 'tt', 'mt', 'sd', 'gn', 'mr', 'ie', 'so', - 'gd', 'csb', 'ug', 'ia', 'st', 'roa-rup', 'si', 'hif', 'mi', 'fo', + 'gd', 'csb', 'ug', 'ia', 'st', 'roa-rup', 'si', 'hif', 'fo', 'mi', 'ay', 'kl', 'jbo', 'ln', 'su', 'zu', 'na', 'gu', 'gv', 'kw', 'rw', 'ts', 'ne', 'om', 'qu', 'ss', 'ha', 'iu', 'am', 'dv', 'tpi', 'yi', 'ti', 'sg', 'tn', 'ks', -- To view, visit
https://gerrit.wikimedia.org/r/533752
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id41e50f15b8f2960e33683c4f080f24f7e437ef3 Gerrit-Change-Number: 533752 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-Reviewer: jenkins-bot (75)
1
0
0
0
[Gerrit] pywikibot/core[master]: [IMPR] Derive CommonscatBot from ExistingPageBot and NoRedirectPageBot
by jenkins-bot (Code Review)
01 Sep '19
01 Sep '19
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/507838
) Change subject: [IMPR] Derive CommonscatBot from ExistingPageBot and NoRedirectPageBot ...................................................................... [IMPR] Derive CommonscatBot from ExistingPageBot and NoRedirectPageBot - Use ExistingPageBot and NoRedirectPageBot instead of skipping inside treat method - use skip_page method for skipping category redirects and disambiguation pages - use treat_page instead of treat method Change-Id: I775b55ce7b5dedfa34c9b04d95ec52ceb7661100 --- M scripts/commonscat.py 1 file changed, 18 insertions(+), 18 deletions(-) Approvals: D3r1ck01: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/commonscat.py b/scripts/commonscat.py index 1be4a49..33ff6ea 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -64,7 +64,7 @@ import pywikibot from pywikibot import i18n, pagegenerators -from pywikibot.bot import SingleSiteBot +from pywikibot.bot import SingleSiteBot, ExistingPageBot, NoRedirectPageBot from scripts.add_text import add_text @@ -227,7 +227,7 @@ } -class CommonscatBot(SingleSiteBot): +class CommonscatBot(SingleSiteBot, ExistingPageBot, NoRedirectPageBot): """Commons categorisation bot.""" @@ -238,22 +238,23 @@ }) super(CommonscatBot, self).__init__(**kwargs) - def treat(self, page): + def skip_page(self, page): + """Skip category redirects or disambigs.""" + if page.isCategoryRedirect(): + pywikibot.warning( + 'Page {page} on {page.site} is a category redirect. ' + 'Skipping.'.format(page=page)) + return True + if page.isDisambig(): + pywikibot.warning( + 'Page {page} on {page.site} is a disambiguation. ' + 'Skipping.'.format(page=page)) + return True + return super(CommonscatBot, self).skip_page(page) + + def treat_page(self): """Load the given page, do some changes, and save it.""" - if not page.exists(): - pywikibot.output('Page {} does not exist. Skipping.' - .format(page.title(as_link=True))) - elif page.isRedirectPage(): - pywikibot.output('Page {} is a redirect. Skipping.' - .format(page.title(as_link=True))) - elif page.isCategoryRedirect(): - pywikibot.output('Page {} is a category redirect. Skipping.' - .format(page.title(as_link=True))) - elif page.isDisambig(): - pywikibot.output('Page {} is a disambiguation. Skipping.' - .format(page.title(as_link=True))) - else: - self.addCommonscat(page) + self.addCommonscat(self.current_page) @classmethod def getCommonscatTemplate(cls, code=None): @@ -293,7 +294,6 @@ category is found add it to the page. """ - self.current_page = page # Get the right templates for this page primaryCommonscat, commonscatAlternatives = self.getCommonscatTemplate( page.site.code) -- To view, visit
https://gerrit.wikimedia.org/r/507838
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I775b55ce7b5dedfa34c9b04d95ec52ceb7661100 Gerrit-Change-Number: 507838 Gerrit-PatchSet: 3 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com> Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz> Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com> Gerrit-Reviewer: jenkins-bot (75)
1
0
0
0
← Newer
1
2
3
4
5
6
7
Older →
Jump to page:
1
2
3
4
5
6
7
Results per page:
10
25
50
100
200