jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Always throttle API request by default
......................................................................
[FIX] Always throttle API request by default
In a354068e710ca961068935238adb04603c100c40 the feature was
introduced to not throttle certain API calls. The default
value is switched in that.
Change-Id: I7e40c467cbdb24ce2bf77458fed9817347aea466
---
M pywikibot/data/api.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 11df17b..b86b803 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -153,7 +153,7 @@
'from it.')
else:
self.mime = kwargs.pop('mime', False)
- self.throttle = kwargs.pop('throttle', False)
+ self.throttle = kwargs.pop('throttle', True)
self.max_retries = kwargs.pop("max_retries", pywikibot.config.max_retries)
self.retry_wait = kwargs.pop("retry_wait", pywikibot.config.retry_wait)
self.params = {}
--
To view, visit https://gerrit.wikimedia.org/r/157676
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7e40c467cbdb24ce2bf77458fed9817347aea466
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: PEP257 on pywikibot folder part II
......................................................................
PEP257 on pywikibot folder part II
files: family, fixes, i18n and interwiki_graph
Checked by hand and added some suggestions based on this change:
I910fdd7ce36752fa44b9a6654d7b8509e5020dee
Also revoved RversionTab which is not needed:
1- Never been used in pywikibot
2- Related to wikis without API support see lines 1032-1040 in wikipedia.py in compat
Change-Id: I1fb9267828d68743d0a4a8533d7b0433e7205ac6
---
M pywikibot/family.py
M pywikibot/fixes.py
M pywikibot/i18n.py
M pywikibot/interwiki_graph.py
4 files changed, 42 insertions(+), 37 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/family.py b/pywikibot/family.py
index f7affb1..ad322cd 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -841,9 +841,10 @@
return list(self.langs.keys())
def _addlang(self, code, location, namespaces={}):
- """Add a new language to the langs and namespaces of the family.
- This is supposed to be called in the constructor of the family.
+ """
+ Add a new language to the langs and namespaces of the family.
+ This is supposed to be called in the constructor of the family.
"""
self.langs[code] = location
# for num, val in namespaces.items():
@@ -861,7 +862,6 @@
[[MediaWiki:Linktrail]], because the MW software currently uses a
built-in linktrail from its message files and ignores the wiki
value.
-
"""
if code in self.linktrails:
return self.linktrails[code]
@@ -919,6 +919,10 @@
"""
Can be overridden to return 'https'. Other protocols are not supported.
+ @param code: language code
+ @type code: string
+ @return: protocol that this family uses
+ @rtype: string
"""
return 'http'
@@ -940,7 +944,6 @@
The default value is the one used on Wikimedia Foundation wikis,
but needs to be overridden in the family file for any wiki that
uses a different value.
-
"""
return '/w'
@@ -971,21 +974,21 @@
# Which version of MediaWiki is used?
def version(self, code):
""" Return MediaWiki version number as a string.
- Use LooseVersion from distutils.version to compare version strings.
+ Use LooseVersion from distutils.version to compare version strings.
"""
# Here we return the latest mw release for downloading
return '1.23.2'
@deprecated("version()")
def versionnumber(self, code):
- """ DEPRECATED, use version() instead and use
- distutils.version.LooseVersion to compare version strings.
+ """ DEPRECATED, use version() instead.
+
+ Use distutils.version.LooseVersion to compare version strings.
Return an int identifying MediaWiki version.
Currently this is implemented as returning the minor version
number; i.e., 'X' in version '1.X.Y'
-
"""
R = re.compile(r"(\d+).(\d+)")
M = R.search(self.version(code))
@@ -995,22 +998,20 @@
return 1000 * int(M.group(1)) + int(M.group(2)) - 1000
def code2encoding(self, code):
- """Return the encoding for a specific language wiki"""
+ """Return the encoding for a specific language wiki."""
return 'utf-8'
def code2encodings(self, code):
- """Return a list of historical encodings for a specific language
- wiki"""
+ """Return list of historical encodings for a specific language Wiki."""
return self.code2encoding(code),
# aliases
def encoding(self, code):
- """Return the encoding for a specific language wiki"""
+ """Return the encoding for a specific language Wiki."""
return self.code2encoding(code)
def encodings(self, code):
- """Return a list of historical encodings for a specific language
- wiki"""
+ """Return list of historical encodings for a specific language Wiki."""
return self.code2encodings(code)
def __cmp__(self, otherfamily):
@@ -1028,15 +1029,8 @@
def __repr__(self):
return 'Family("%s")' % self.name
- def RversionTab(self, code):
- """Change this to some regular expression that shows the page we
- found is an existing page, in case the normal regexp does not work.
-
- """
- return None
-
def has_query_api(self, code):
- """Is query.php installed in the wiki?"""
+ """Check query.php installed in the wiki."""
return False
def shared_image_repository(self, code):
@@ -1050,22 +1044,32 @@
@deprecated("Site.getcurrenttime()")
def server_time(self, code):
"""
- DEPRECATED, use Site.getcurrenttime() instead
- Return a datetime object representing server time"""
+ DEPRECATED, use Site.getcurrenttime() instead.
+
+ Return a datetime object representing server time.
+ """
return pywikibot.Site(code, self).getcurrenttime()
def isPublic(self, code):
- """Does the wiki require logging in before viewing it?"""
+ """Check the wiki require logging in before viewing it."""
return True
def post_get_convert(self, site, getText):
- """Do a conversion on the retrieved text from the wiki
- i.e. Esperanto X-conversion """
+ """
+ Do a conversion on the retrieved text from the Wiki.
+
+ For example a X-conversion in Esperanto
+ U{https://en.wikipedia.org/wiki/Esperanto_orthography#X-system}.
+ """
return getText
def pre_put_convert(self, site, putText):
- """Do a conversion on the text to insert on the wiki
- i.e. Esperanto X-conversion """
+ """
+ Do a conversion on the text to insert on the Wiki.
+
+ For example a X-conversion in Esperanto
+ U{https://en.wikipedia.org/wiki/Esperanto_orthography#X-system}.
+ """
return putText
@@ -1084,9 +1088,10 @@
]
def version(self, code):
- """Return Wikimedia projects version number as a string.
- Use LooseVersion from distutils.version to compate versions.
+ """
+ Return Wikimedia projects version number as a string.
+ Use LooseVersion from distutils.version to compate versions.
"""
# Here we return the latest mw release of wikimedia projects
return '1.24wmf17'
diff --git a/pywikibot/fixes.py b/pywikibot/fixes.py
index b5e8002..723631d 100644
--- a/pywikibot/fixes.py
+++ b/pywikibot/fixes.py
@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-
-"""
-File containing all standard fixes
-
-"""
+"""File containing all standard fixes."""
#
# (C) Pywikibot team, 2008-2010
diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py
index cb6bd71..ffd143a 100644
--- a/pywikibot/i18n.py
+++ b/pywikibot/i18n.py
@@ -229,7 +229,8 @@
class TranslationError(Error):
- """ Raised when no correct translation could be found """
+ """Raised when no correct translation could be found."""
+
pass
diff --git a/pywikibot/interwiki_graph.py b/pywikibot/interwiki_graph.py
index 3fec68b..269c15f 100644
--- a/pywikibot/interwiki_graph.py
+++ b/pywikibot/interwiki_graph.py
@@ -129,7 +129,9 @@
def createGraph(self):
"""
- See http://meta.wikimedia.org/wiki/Interwiki_graphs
+ Create graph of the interwiki links.
+
+ For more info see U{http://meta.wikimedia.org/wiki/Interwiki_graphs}
"""
pywikibot.output(u'Preparing graph for %s'
% self.subject.originPage.title())
--
To view, visit https://gerrit.wikimedia.org/r/157203
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1fb9267828d68743d0a4a8533d7b0433e7205ac6
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Siebrand <siebrand(a)kitano.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: PEP257 on pywikibot folder part I
......................................................................
PEP257 on pywikibot folder part I
files: bot, date and editor.
Checked by hand and added some suggestions based on this change:
I910fdd7ce36752fa44b9a6654d7b8509e5020dee
Change-Id: I59a2b271bee8c0a9a37db28ef0fa66f69ad30412
---
M pywikibot/bot.py
M pywikibot/date.py
M pywikibot/editor.py
3 files changed, 27 insertions(+), 24 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 2417922..bdf5915 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-"""
-User-interface related functions for building bots
-"""
+"""User-interface related functions for building bots"""
#
# (C) Pywikibot team, 2008-2013
#
diff --git a/pywikibot/date.py b/pywikibot/date.py
index c6b1944..1d39f77 100644
--- a/pywikibot/date.py
+++ b/pywikibot/date.py
@@ -79,63 +79,69 @@
# Various filters are item dependent.
#
def dh_noConv(value, pattern, limit):
- """decoding helper for a single integer value, no conversion, no rounding"""
+ """Helper for decoding a single integer value, no conversion, no rounding."""
return dh(value, pattern, encNoConv, decSinglVal, limit)
def dh_dayOfMnth(value, pattern):
- """decoding helper for a single integer value <=31, no conversion,
- no rounding (used in days of month)
+ """
+ Helper for decoding a single integer value.
+ The single integer should be <=31, no conversion,
+ no rounding (used in days of month).
"""
# For now use January because it has all 31 days
return dh_noConv(value, pattern, formatLimits[dayMnthFmts[0]][0])
def dh_mnthOfYear(value, pattern):
- """decoding helper for a single integer value >=1000, no conversion,
- no rounding (used in month of the year)
+ """
+ Helper for decoding a single integer value.
+ The value should be >=1000, no conversion,
+ no rounding (used in month of the year)
"""
return dh_noConv(value, pattern, _formatLimit_MonthOfYear[0])
def dh_decAD(value, pattern):
- """decoding helper for a single integer value, no conversion,
- round to decimals (used in decades)
+ """
+ Helper for decoding a single integer value.
+ It should be no conversion, round to decimals (used in decades)
"""
return dh(value, pattern, encDec0, decSinglVal, formatLimits['DecadeAD'][0])
def dh_decBC(value, pattern):
- """decoding helper for a single integer value, no conversion,
- round to decimals (used in decades)
+ """
+ Helper for decoding a single integer value.
+ It should be no conversion, round to decimals (used in decades)
"""
return dh(value, pattern, encDec0, decSinglVal, formatLimits['DecadeBC'][0])
def dh_yearBC(value, pattern):
- """decoding helper for a year value, no conversion, no rounding,
- limits to 3000
+ """Helper for decoding a year value.
+ The value should have no conversion, no rounding, limits to 3000.
"""
return dh_noConv(value, pattern, formatLimits['YearBC'][0])
def dh_yearAD(value, pattern):
- """decoding helper for a year value, no conversion, no rounding,
- limits to 3000
+ """Helper for decoding a year value.
+ The value should have no conversion, no rounding, limits to 3000.
"""
return dh_noConv(value, pattern, formatLimits['YearAD'][0])
def dh_simpleYearAD(value):
- """decoding helper for a single integer value representing a year with
- no extra symbols
+ """Helper for decoding a single integer value.
+ This value should be representing a year with no extra symbols.
"""
return dh_yearAD(value, u'%d')
@@ -332,10 +338,11 @@
def escapePattern2(pattern):
- """Convert a string pattern into a regex expression and cache.
- Allows matching of any _digitDecoders inside the string.
- Returns a compiled regex object and a list of digit decoders
+ """
+ Convert a string pattern into a regex expression and cache.
+ Allows matching of any _digitDecoders inside the string.
+ Returns a compiled regex object and a list of digit decoders.
"""
if pattern not in _escPtrnCache2:
diff --git a/pywikibot/editor.py b/pywikibot/editor.py
index e921d49..1b6b1b5 100644
--- a/pywikibot/editor.py
+++ b/pywikibot/editor.py
@@ -1,8 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-"""
-Text editor class for your favourite editor.
-"""
+"""Text editor class for your favourite editor."""
#
# (C) Gerrit Holl, 2004
--
To view, visit https://gerrit.wikimedia.org/r/157189
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I59a2b271bee8c0a9a37db28ef0fa66f69ad30412
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: set interwiki_forward = 'wikipedia' for the Wikidata family
......................................................................
set interwiki_forward = 'wikipedia' for the Wikidata family
like it is already set for Commons
Change-Id: If3270ba991a1baa94ff13d1de712b4719b4c081d
---
M pywikibot/families/wikidata_family.py
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/families/wikidata_family.py b/pywikibot/families/wikidata_family.py
index 2e33e5b..b5dde92 100644
--- a/pywikibot/families/wikidata_family.py
+++ b/pywikibot/families/wikidata_family.py
@@ -16,6 +16,8 @@
'test': 'test.wikidata.org',
}
+ self.interwiki_forward = 'wikipedia'
+
def shared_data_repository(self, code, transcluded=False):
"""
Indicate Wikidata is both a repository and its own client.
--
To view, visit https://gerrit.wikimedia.org/r/157638
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If3270ba991a1baa94ff13d1de712b4719b4c081d
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Improving transliteration support for Chinese
......................................................................
Improving transliteration support for Chinese
Some Chinese characters are unfortunately buggy with the generator and excluded.
Bug: 56524
Change-Id: I5581662a46ed8b8e64c69a0c20f05ef7ff72895e
---
M pywikibot/userinterfaces/transliteration.py
1 file changed, 789 insertions(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/userinterfaces/transliteration.py b/pywikibot/userinterfaces/transliteration.py
index 5389a2f..2cbae3a 100644
--- a/pywikibot/userinterfaces/transliteration.py
+++ b/pywikibot/userinterfaces/transliteration.py
@@ -1657,6 +1657,795 @@
self.trans[u"໗"] = "7"
self.trans[u"໘"] = "8"
self.trans[u"໙"] = "9"
+ # Chinese -- note: incomplete
+ for char in u"埃挨哎唉哀皑癌蔼矮艾碍爱隘":
+ self.trans[char] = u"ai"
+ for char in u"鞍氨安俺按暗岸胺案":
+ self.trans[char] = u"an"
+ for char in u"肮昂盎":
+ self.trans[char] = u"ang"
+ for char in u"凹敖熬翱袄傲奥懊澳":
+ self.trans[char] = u"ao"
+ for char in u"芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸":
+ self.trans[char] = u"ba"
+ for char in u"白柏百摆佰败拜稗":
+ self.trans[char] = u"bai"
+ for char in u"斑班搬扳般颁板版扮拌伴瓣半办绊":
+ self.trans[char] = u"ban"
+ for char in u"邦帮梆榜膀绑棒磅蚌镑傍谤":
+ self.trans[char] = u"bang"
+ for char in u"苞胞包褒剥薄雹保堡饱宝抱报暴豹鲍爆":
+ self.trans[char] = u"bao"
+ for char in u"杯碑悲卑北辈背贝钡倍狈备惫焙被":
+ self.trans[char] = u"bei"
+ for char in u"奔苯本笨":
+ self.trans[char] = u"ben"
+ for char in u"崩绷甭泵蹦迸":
+ self.trans[char] = u"beng"
+ for char in u"逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛":
+ self.trans[char] = u"bi"
+ for char in u"鞭边编贬扁便变卞辨辩辫遍":
+ self.trans[char] = u"bian"
+ for char in u"标彪膘表":
+ self.trans[char] = u"biao"
+ for char in u"鳖憋别瘪":
+ self.trans[char] = u"bie"
+ for char in u"彬斌濒滨宾摈":
+ self.trans[char] = u"bin"
+ for char in u"兵冰柄丙秉饼炳病并":
+ self.trans[char] = u"bing"
+ for char in u"玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜亳":
+ self.trans[char] = u"bo"
+ for char in u"哺补埠不布步簿部怖":
+ self.trans[char] = u"bu"
+ for char in u"猜裁材才财睬踩采彩菜蔡":
+ self.trans[char] = u"cai"
+ for char in u"餐参蚕残惭惨灿":
+ self.trans[char] = u"can"
+ for char in u"苍舱仓沧藏":
+ self.trans[char] = u"cang"
+ for char in u"操糙槽曹草":
+ self.trans[char] = u"cao"
+ for char in u"厕策侧册测":
+ self.trans[char] = u"ce"
+ for char in u"层蹭":
+ self.trans[char] = u"ceng"
+ for char in u"插叉茬茶查碴搽察岔差诧":
+ self.trans[char] = u"cha"
+ for char in u"拆柴豺":
+ self.trans[char] = u"chai"
+ for char in u"搀掺蝉馋谗缠铲产阐颤":
+ self.trans[char] = u"chan"
+ for char in u"昌猖场尝常长偿肠厂敞畅唱倡":
+ self.trans[char] = u"chang"
+ for char in u"超抄钞朝嘲潮巢吵炒":
+ self.trans[char] = u"chao"
+ for char in u"车扯撤掣彻澈":
+ self.trans[char] = u"che"
+ for char in u"郴臣辰尘晨忱沉陈趁衬":
+ self.trans[char] = u"chen"
+ for char in u"撑称城橙成呈乘程惩澄诚承逞骋秤":
+ self.trans[char] = u"cheng"
+ for char in u"吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽":
+ self.trans[char] = u"chi"
+ for char in u"充冲虫崇宠":
+ self.trans[char] = u"chong"
+ for char in u"抽酬畴踌稠愁筹仇绸瞅丑臭":
+ self.trans[char] = u"chou"
+ for char in u"初出橱厨躇锄雏滁除楚储矗搐触处":
+ self.trans[char] = u"chu"
+ for char in u"揣":
+ self.trans[char] = u"chuai"
+ for char in u"川穿椽传船喘串":
+ self.trans[char] = u"chuan"
+ for char in u"疮窗幢床闯创":
+ self.trans[char] = u"chuang"
+ for char in u"吹炊捶锤垂":
+ self.trans[char] = u"chui"
+ for char in u"春椿醇唇淳纯蠢":
+ self.trans[char] = u"chun"
+ for char in u"戳绰":
+ self.trans[char] = u"chuo"
+ for char in u"疵茨磁雌辞慈瓷词此刺赐次":
+ self.trans[char] = u"ci"
+ for char in u"聪葱囱匆从丛":
+ self.trans[char] = u"cong"
+ for char in u"凑":
+ self.trans[char] = u"cou"
+ for char in u"粗醋簇促":
+ self.trans[char] = u"cu"
+ for char in u"蹿篡窜":
+ self.trans[char] = u"cuan"
+ for char in u"摧崔催脆瘁粹淬翠":
+ self.trans[char] = u"cui"
+ for char in u"村存寸":
+ self.trans[char] = u"cun"
+ for char in u"磋撮搓措挫错":
+ self.trans[char] = u"cuo"
+ for char in u"搭达答瘩打大":
+ self.trans[char] = u"da"
+ for char in u"呆歹傣戴带殆代贷袋待逮怠":
+ self.trans[char] = u"dai"
+ for char in u"耽担丹单郸掸胆旦氮但惮淡诞弹蛋儋":
+ self.trans[char] = u"dan"
+ for char in u"当挡党荡档":
+ self.trans[char] = u"dang"
+ for char in u"刀捣蹈倒岛祷导到稻悼道盗":
+ self.trans[char] = u"dao"
+ for char in u"德得的":
+ self.trans[char] = u"de"
+ for char in u"蹬灯登等瞪凳邓":
+ self.trans[char] = u"deng"
+ for char in u"堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔":
+ self.trans[char] = u"di"
+ for char in u"颠掂滇碘点典靛垫电佃甸店惦奠淀殿":
+ self.trans[char] = u"dian"
+ for char in u"碉叼雕凋刁掉吊钓调":
+ self.trans[char] = u"diao"
+ for char in u"跌爹碟蝶迭谍叠":
+ self.trans[char] = u"die"
+ for char in u"丁盯叮钉顶鼎锭定订":
+ self.trans[char] = u"ding"
+ for char in u"丢":
+ self.trans[char] = u"diu"
+ for char in u"东冬董懂动栋侗恫冻洞":
+ self.trans[char] = u"dong"
+ for char in u"兜抖斗陡豆逗痘":
+ self.trans[char] = u"dou"
+ for char in u"都督毒犊独读堵睹赌杜镀肚度渡妒":
+ self.trans[char] = u"du"
+ for char in u"端短锻段断缎":
+ self.trans[char] = u"duan"
+ for char in u"堆兑队对":
+ self.trans[char] = u"dui"
+ for char in u"墩吨蹲敦顿囤钝盾遁":
+ self.trans[char] = u"dun"
+ for char in u"掇哆多夺垛躲朵跺舵剁惰堕":
+ self.trans[char] = u"duo"
+ for char in u"蛾峨鹅俄额讹娥恶厄扼遏鄂饿":
+ self.trans[char] = u"e"
+ for char in u"恩嗯":
+ self.trans[char] = u"en"
+ for char in u"而儿耳尔饵洱二贰":
+ self.trans[char] = u"er"
+ for char in u"发罚筏伐乏阀法珐":
+ self.trans[char] = u"fa"
+ for char in u"藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛":
+ self.trans[char] = u"fan"
+ for char in u"坊芳方肪房防妨仿访纺放":
+ self.trans[char] = u"fang"
+ for char in u"菲非啡飞肥匪诽吠肺废沸费":
+ self.trans[char] = u"fei"
+ for char in u"芬酚吩氛分纷坟焚汾粉奋份忿愤粪":
+ self.trans[char] = u"fen"
+ for char in u"丰封枫蜂峰锋风疯烽逢冯缝讽奉凤":
+ self.trans[char] = u"feng"
+ for char in u"佛":
+ self.trans[char] = u"fo"
+ for char in u"否":
+ self.trans[char] = u"fou"
+ for char in u"夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐":
+ self.trans[char] = u"fu"
+ for char in u"噶嘎":
+ self.trans[char] = u"ga"
+ for char in u"该改概钙盖溉":
+ self.trans[char] = u"gai"
+ for char in u"干甘杆柑竿肝赶感秆敢赣":
+ self.trans[char] = u"gan"
+ for char in u"冈刚钢缸肛纲岗港杠":
+ self.trans[char] = u"gang"
+ for char in u"篙皋高膏羔糕搞镐稿告":
+ self.trans[char] = u"gao"
+ for char in u"哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各":
+ self.trans[char] = u"ge"
+ for char in u"给":
+ self.trans[char] = u"gei"
+ for char in u"根跟":
+ self.trans[char] = u"gen"
+ for char in u"耕更庚羹埂耿梗":
+ self.trans[char] = u"geng"
+ for char in u"工攻功恭龚供躬公宫弓巩汞拱贡共":
+ self.trans[char] = u"gong"
+ for char in u"钩勾沟苟狗垢构购够":
+ self.trans[char] = u"gou"
+ for char in u"辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇":
+ self.trans[char] = u"gu"
+ for char in u"刮瓜剐寡挂褂":
+ self.trans[char] = u"gua"
+ for char in u"乖拐怪":
+ self.trans[char] = u"guai"
+ for char in u"棺关官冠观管馆罐惯灌贯":
+ self.trans[char] = u"guan"
+ for char in u"光广逛":
+ self.trans[char] = u"guang"
+ for char in u"瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽":
+ self.trans[char] = u"gui"
+ for char in u"辊滚棍":
+ self.trans[char] = u"gun"
+ for char in u"锅郭国果裹过":
+ self.trans[char] = u"guo"
+ for char in u"哈":
+ self.trans[char] = u"ha"
+ for char in u"骸孩海氦亥害骇":
+ self.trans[char] = u"hai"
+ for char in u"酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉":
+ self.trans[char] = u"han"
+ for char in u"夯杭航":
+ self.trans[char] = u"hang"
+ for char in u"壕嚎豪毫郝好耗号浩":
+ self.trans[char] = u"hao"
+ for char in u"呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺":
+ self.trans[char] = u"he"
+ for char in u"嘿黑":
+ self.trans[char] = u"hei"
+ for char in u"痕很狠恨":
+ self.trans[char] = u"hen"
+ for char in u"哼亨横衡恒":
+ self.trans[char] = u"heng"
+ for char in u"轰哄烘虹鸿洪宏弘红":
+ self.trans[char] = u"hong"
+ for char in u"喉侯猴吼厚候后":
+ self.trans[char] = u"hou"
+ for char in u"呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户":
+ self.trans[char] = u"hu"
+ for char in u"花哗华猾滑画划化话":
+ self.trans[char] = u"hua"
+ for char in u"槐徊怀淮坏":
+ self.trans[char] = u"huai"
+ for char in u"欢环桓还缓换患唤痪豢焕涣宦幻":
+ self.trans[char] = u"huan"
+ for char in u"荒慌黄磺蝗簧皇凰惶煌晃幌恍谎":
+ self.trans[char] = u"huang"
+ for char in u"灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘":
+ self.trans[char] = u"hui"
+ for char in u"荤昏婚魂浑混":
+ self.trans[char] = u"hun"
+ for char in u"豁活伙火获或惑霍货祸":
+ self.trans[char] = u"huo"
+ for char in u"击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪":
+ self.trans[char] = u"ji"
+ for char in u"嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁":
+ self.trans[char] = u"jia"
+ for char in u"歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建":
+ self.trans[char] = u"jian"
+ for char in u"僵姜将浆江疆蒋桨奖讲匠酱降":
+ self.trans[char] = u"jiang"
+ for char in u"蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖":
+ self.trans[char] = u"jiao"
+ for char in u"揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届":
+ self.trans[char] = u"jie"
+ for char in u"巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽劲":
+ self.trans[char] = u"jin"
+ for char in u"荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净":
+ self.trans[char] = u"jing"
+ for char in u"囧炯窘":
+ self.trans[char] = u"jiong"
+ for char in u"揪究纠玖韭久灸九酒厩救旧臼舅咎就疚":
+ self.trans[char] = u"jiu"
+ for char in u"鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧":
+ self.trans[char] = u"ju"
+ for char in u"捐鹃娟倦眷卷绢":
+ self.trans[char] = u"juan"
+ for char in u"撅攫抉掘倔爵觉决诀绝":
+ self.trans[char] = u"jue"
+ for char in u"均菌钧军君峻俊竣浚郡骏":
+ self.trans[char] = u"jun"
+ for char in u"喀咖卡咯":
+ self.trans[char] = u"ka"
+ for char in u"开揩楷凯慨":
+ self.trans[char] = u"kai"
+ for char in u"刊堪勘坎砍看":
+ self.trans[char] = u"kan"
+ for char in u"康慷糠扛抗亢炕":
+ self.trans[char] = u"kang"
+ for char in u"考拷烤靠":
+ self.trans[char] = u"kao"
+ for char in u"坷苛柯棵磕颗科壳咳可渴克刻客课":
+ self.trans[char] = u"ke"
+ for char in u"肯啃垦恳":
+ self.trans[char] = u"ken"
+ for char in u"坑吭":
+ self.trans[char] = u"keng"
+ for char in u"空恐孔控":
+ self.trans[char] = u"kong"
+ for char in u"抠口扣寇":
+ self.trans[char] = u"kou"
+ for char in u"枯哭窟苦酷库裤":
+ self.trans[char] = u"ku"
+ for char in u"夸垮挎跨胯":
+ self.trans[char] = u"kua"
+ for char in u"块筷侩快":
+ self.trans[char] = u"kuai"
+ for char in u"宽款":
+ self.trans[char] = u"kuan"
+ for char in u"匡筐狂框矿眶旷况":
+ self.trans[char] = u"kuang"
+ for char in u"亏盔岿窥葵奎魁傀馈愧溃":
+ self.trans[char] = u"kui"
+ for char in u"坤昆捆困":
+ self.trans[char] = u"kun"
+ for char in u"括扩廓阔":
+ self.trans[char] = u"kuo"
+ for char in u"垃拉喇蜡腊辣啦":
+ self.trans[char] = u"la"
+ for char in u"莱来赖":
+ self.trans[char] = u"lai"
+ for char in u"蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥":
+ self.trans[char] = u"lan"
+ for char in u"琅榔狼廊郎朗浪":
+ self.trans[char] = u"lang"
+ for char in u"捞劳牢老佬姥酪烙涝":
+ self.trans[char] = u"lao"
+ for char in u"勒乐":
+ self.trans[char] = u"le"
+ for char in u"雷镭蕾磊累儡垒擂肋类泪":
+ self.trans[char] = u"lei"
+ for char in u"棱楞冷":
+ self.trans[char] = u"leng"
+ for char in u"厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩":
+ self.trans[char] = u"li"
+ for char in u"俩":
+ self.trans[char] = u"lia"
+ for char in u"联莲连镰廉怜涟帘敛脸链恋炼练":
+ self.trans[char] = u"lian"
+ for char in u"粮凉梁粱良两辆量晾亮谅":
+ self.trans[char] = u"liang"
+ for char in u"撩聊僚疗燎寥辽潦了撂镣廖料":
+ self.trans[char] = u"liao"
+ for char in u"列裂烈劣猎":
+ self.trans[char] = u"lie"
+ for char in u"琳林磷霖临邻鳞淋凛赁吝拎":
+ self.trans[char] = u"lin"
+ for char in u"玲菱零龄铃伶羚凌灵陵岭领另令":
+ self.trans[char] = u"ling"
+ for char in u"溜琉榴硫馏留刘瘤流柳六":
+ self.trans[char] = u"liu"
+ for char in u"龙聋咙笼窿隆垄拢陇":
+ self.trans[char] = u"long"
+ for char in u"楼娄搂篓漏陋":
+ self.trans[char] = u"lou"
+ for char in u"芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮泸":
+ self.trans[char] = u"lu"
+ for char in u"峦挛孪滦卵乱":
+ self.trans[char] = u"luan"
+ for char in u"掠略":
+ self.trans[char] = u"lue"
+ for char in u"抡轮伦仑沦纶论":
+ self.trans[char] = u"lun"
+ for char in u"萝螺罗逻锣箩骡裸落洛骆络漯":
+ self.trans[char] = u"luo"
+ for char in u"驴吕铝侣旅履屡缕虑氯律率滤绿":
+ self.trans[char] = u"lv"
+ for char in u"妈麻玛码蚂马骂嘛吗":
+ self.trans[char] = u"ma"
+ for char in u"埋买麦卖迈脉":
+ self.trans[char] = u"mai"
+ for char in u"瞒馒蛮满蔓曼慢漫谩":
+ self.trans[char] = u"man"
+ for char in u"芒茫盲氓忙莽":
+ self.trans[char] = u"mang"
+ for char in u"猫茅锚毛矛铆卯茂冒帽貌贸":
+ self.trans[char] = u"mao"
+ for char in u"么":
+ self.trans[char] = u"me"
+ for char in u"玫枚梅酶霉煤没眉媒镁每美昧寐妹媚":
+ self.trans[char] = u"mei"
+ for char in u"门闷们":
+ self.trans[char] = u"men"
+ for char in u"萌蒙檬盟锰猛梦孟":
+ self.trans[char] = u"meng"
+ for char in u"眯醚靡糜迷谜弥米秘觅泌蜜密幂":
+ self.trans[char] = u"mi"
+ for char in u"棉眠绵冕免勉娩缅面":
+ self.trans[char] = u"mian"
+ for char in u"苗描瞄藐秒渺庙妙":
+ self.trans[char] = u"miao"
+ for char in u"蔑灭":
+ self.trans[char] = u"mie"
+ for char in u"民抿皿敏悯闽":
+ self.trans[char] = u"min"
+ for char in u"明螟鸣铭名命":
+ self.trans[char] = u"ming"
+ for char in u"谬":
+ self.trans[char] = u"miu"
+ for char in u"摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌":
+ self.trans[char] = u"mo"
+ for char in u"谋牟某":
+ self.trans[char] = u"mou"
+ for char in u"拇牡亩姆母墓暮幕募慕木目睦牧穆":
+ self.trans[char] = u"mu"
+ for char in u"拿哪呐钠那娜纳":
+ self.trans[char] = u"na"
+ for char in u"氖乃奶耐奈":
+ self.trans[char] = u"nai"
+ for char in u"南男难":
+ self.trans[char] = u"nan"
+ for char in u"囊":
+ self.trans[char] = u"nang"
+ for char in u"挠脑恼闹淖":
+ self.trans[char] = u"nao"
+ for char in u"呢":
+ self.trans[char] = u"ne"
+ for char in u"馁内":
+ self.trans[char] = u"nei"
+ for char in u"嫩":
+ self.trans[char] = u"nen"
+ for char in u"能":
+ self.trans[char] = u"neng"
+ for char in u"妮霓倪泥尼拟你匿腻逆溺":
+ self.trans[char] = u"ni"
+ for char in u"蔫拈年碾撵捻念":
+ self.trans[char] = u"nian"
+ for char in u"娘酿":
+ self.trans[char] = u"niang"
+ for char in u"鸟尿":
+ self.trans[char] = u"niao"
+ for char in u"捏聂孽啮镊镍涅":
+ self.trans[char] = u"nie"
+ for char in u"您":
+ self.trans[char] = u"nin"
+ for char in u"柠狞凝宁拧泞":
+ self.trans[char] = u"ning"
+ for char in u"牛扭钮纽":
+ self.trans[char] = u"niu"
+ for char in u"脓浓农弄":
+ self.trans[char] = u"nong"
+ for char in u"奴努怒":
+ self.trans[char] = u"nu"
+ for char in u"暖":
+ self.trans[char] = u"nuan"
+ for char in u"虐疟":
+ self.trans[char] = u"nue"
+ for char in u"挪懦糯诺":
+ self.trans[char] = u"nuo"
+ for char in u"女":
+ self.trans[char] = u"nv"
+ for char in u"哦":
+ self.trans[char] = u"o"
+ for char in u"欧鸥殴藕呕偶沤":
+ self.trans[char] = u"ou"
+ for char in u"啪趴爬帕怕琶":
+ self.trans[char] = u"pa"
+ for char in u"拍排牌徘湃派":
+ self.trans[char] = u"pai"
+ for char in u"攀潘盘磐盼畔判叛":
+ self.trans[char] = u"pan"
+ for char in u"乓庞旁耪胖":
+ self.trans[char] = u"pang"
+ for char in u"抛咆刨炮袍跑泡":
+ self.trans[char] = u"pao"
+ for char in u"呸胚培裴赔陪配佩沛":
+ self.trans[char] = u"pei"
+ for char in u"喷盆":
+ self.trans[char] = u"pen"
+ for char in u"砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰":
+ self.trans[char] = u"peng"
+ for char in u"坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬":
+ self.trans[char] = u"pi"
+ for char in u"篇偏片骗":
+ self.trans[char] = u"pian"
+ for char in u"飘漂瓢票":
+ self.trans[char] = u"piao"
+ for char in u"撇瞥":
+ self.trans[char] = u"pie"
+ for char in u"拼频贫品聘":
+ self.trans[char] = u"pin"
+ for char in u"乒坪苹萍平凭瓶评屏":
+ self.trans[char] = u"ping"
+ for char in u"坡泼颇婆破魄迫粕剖":
+ self.trans[char] = u"po"
+ for char in u"扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑濮":
+ self.trans[char] = u"pu"
+ for char in u"期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫":
+ self.trans[char] = u"qi"
+ for char in u"掐恰洽":
+ self.trans[char] = u"qia"
+ for char in u"牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉":
+ self.trans[char] = u"qian"
+ for char in u"枪呛腔羌墙蔷强抢":
+ self.trans[char] = u"qiang"
+ for char in u"橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍":
+ self.trans[char] = u"qiao"
+ for char in u"切茄且怯窃":
+ self.trans[char] = u"qie"
+ for char in u"钦侵亲秦琴勤芹擒禽寝沁":
+ self.trans[char] = u"qin"
+ for char in u"青轻氢倾卿清擎晴氰情顷请庆":
+ self.trans[char] = u"qing"
+ for char in u"琼穷":
+ self.trans[char] = u"qiong"
+ for char in u"秋丘邱球求囚酋泅":
+ self.trans[char] = u"qiu"
+ for char in u"趋区蛆曲躯屈驱渠取娶龋趣去":
+ self.trans[char] = u"qu"
+ for char in u"圈颧权醛泉全痊拳犬券劝":
+ self.trans[char] = u"quan"
+ for char in u"缺炔瘸却鹊榷确雀":
+ self.trans[char] = u"que"
+ for char in u"裙群":
+ self.trans[char] = u"qun"
+ for char in u"然燃冉染":
+ self.trans[char] = u"ran"
+ for char in u"瓤壤攘嚷让":
+ self.trans[char] = u"rang"
+ for char in u"饶扰绕":
+ self.trans[char] = u"rao"
+ for char in u"惹热":
+ self.trans[char] = u"re"
+ for char in u"壬仁人忍韧任认刃妊纫":
+ self.trans[char] = u"ren"
+ for char in u"扔仍":
+ self.trans[char] = u"reng"
+ for char in u"日":
+ self.trans[char] = u"ri"
+ for char in u"戎茸蓉荣融熔溶容绒冗":
+ self.trans[char] = u"rong"
+ for char in u"揉柔肉":
+ self.trans[char] = u"rou"
+ for char in u"茹蠕儒孺如辱乳汝入褥":
+ self.trans[char] = u"ru"
+ for char in u"软阮":
+ self.trans[char] = u"ruan"
+ for char in u"蕊瑞锐":
+ self.trans[char] = u"rui"
+ for char in u"闰润":
+ self.trans[char] = u"run"
+ for char in u"若弱":
+ self.trans[char] = u"ruo"
+ for char in u"撒洒萨":
+ self.trans[char] = u"sa"
+ for char in u"腮鳃塞赛":
+ self.trans[char] = u"sai"
+ for char in u"三叁伞散":
+ self.trans[char] = u"san"
+ for char in u"桑嗓丧":
+ self.trans[char] = u"sang"
+ for char in u"搔骚扫嫂":
+ self.trans[char] = u"sao"
+ for char in u"瑟色涩":
+ self.trans[char] = u"se"
+ for char in u"森":
+ self.trans[char] = u"sen"
+ for char in u"僧":
+ self.trans[char] = u"seng"
+ for char in u"莎砂杀刹沙纱傻啥煞":
+ self.trans[char] = u"sha"
+ for char in u"筛晒":
+ self.trans[char] = u"shai"
+ for char in u"珊苫杉山删煽衫闪陕擅赡膳善汕扇缮":
+ self.trans[char] = u"shan"
+ for char in u"墒伤商赏晌上尚裳":
+ self.trans[char] = u"shang"
+ for char in u"梢捎稍烧芍勺韶少哨邵绍":
+ self.trans[char] = u"shao"
+ for char in u"奢赊蛇舌舍赦摄射慑涉社设":
+ self.trans[char] = u"she"
+ for char in u"砷申呻伸身深娠绅神沈审婶甚肾慎渗":
+ self.trans[char] = u"shen"
+ for char in u"声生甥牲升绳省盛剩胜圣":
+ self.trans[char] = u"sheng"
+ for char in u"师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试":
+ self.trans[char] = u"shi"
+ for char in u"收手首守寿授售受瘦兽":
+ self.trans[char] = u"shou"
+ for char in u"蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕":
+ self.trans[char] = u"shu"
+ for char in u"刷耍":
+ self.trans[char] = u"shua"
+ for char in u"摔衰甩帅":
+ self.trans[char] = u"shuai"
+ for char in u"栓拴":
+ self.trans[char] = u"shuan"
+ for char in u"霜双爽":
+ self.trans[char] = u"shuang"
+ for char in u"谁水睡税":
+ self.trans[char] = u"shui"
+ for char in u"吮瞬顺舜":
+ self.trans[char] = u"shun"
+ for char in u"说硕朔烁":
+ self.trans[char] = u"shuo"
+ for char in u"斯撕嘶思私司丝死肆寺嗣四伺似饲巳":
+ self.trans[char] = u"si"
+ for char in u"松耸怂颂送宋讼诵":
+ self.trans[char] = u"song"
+ for char in u"搜艘擞":
+ self.trans[char] = u"sou"
+ for char in u"嗽苏酥俗素速粟僳塑溯宿诉肃":
+ self.trans[char] = u"su"
+ for char in u"酸蒜算":
+ self.trans[char] = u"suan"
+ for char in u"虽隋随绥髓碎岁穗遂隧祟":
+ self.trans[char] = u"sui"
+ for char in u"孙损笋":
+ self.trans[char] = u"sun"
+ for char in u"蓑梭唆缩琐索锁所":
+ self.trans[char] = u"suo"
+ for char in u"塌他它她塔獭挞蹋踏":
+ self.trans[char] = u"ta"
+ for char in u"胎苔抬台泰酞太态汰":
+ self.trans[char] = u"tai"
+ for char in u"坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭":
+ self.trans[char] = u"tan"
+ for char in u"汤塘搪堂棠膛唐糖倘躺淌趟烫":
+ self.trans[char] = u"tang"
+ for char in u"掏涛滔绦萄桃逃淘陶讨套":
+ self.trans[char] = u"tao"
+ for char in u"特":
+ self.trans[char] = u"te"
+ for char in u"藤腾疼誊":
+ self.trans[char] = u"teng"
+ for char in u"梯剔踢锑提题蹄啼体替嚏惕涕剃屉":
+ self.trans[char] = u"ti"
+ for char in u"兲天添填田甜恬舔腆":
+ self.trans[char] = u"tian"
+ for char in u"挑条迢眺跳":
+ self.trans[char] = u"tiao"
+ for char in u"贴铁帖":
+ self.trans[char] = u"tie"
+ for char in u"厅听烃汀廷停亭庭挺艇":
+ self.trans[char] = u"ting"
+ for char in u"通桐酮瞳同铜彤童桶捅筒统痛":
+ self.trans[char] = u"tong"
+ for char in u"偷投头透":
+ self.trans[char] = u"tou"
+ for char in u"凸秃突图徒途涂屠土吐兔":
+ self.trans[char] = u"tu"
+ for char in u"湍团":
+ self.trans[char] = u"tuan"
+ for char in u"推颓腿蜕褪退":
+ self.trans[char] = u"tui"
+ for char in u"吞屯臀":
+ self.trans[char] = u"tun"
+ for char in u"拖托脱鸵陀驮驼椭妥拓唾":
+ self.trans[char] = u"tuo"
+ for char in u"挖哇蛙洼娃瓦袜":
+ self.trans[char] = u"wa"
+ for char in u"歪外":
+ self.trans[char] = u"wai"
+ for char in u"豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕莞":
+ self.trans[char] = u"wan"
+ for char in u"汪王亡枉网往旺望忘妄":
+ self.trans[char] = u"wang"
+ for char in u"威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫":
+ self.trans[char] = u"wei"
+ for char in u"瘟温蚊文闻纹吻稳紊问":
+ self.trans[char] = u"wen"
+ for char in u"嗡翁瓮":
+ self.trans[char] = u"weng"
+ for char in u"挝蜗涡窝我斡卧握沃":
+ self.trans[char] = u"wo"
+ for char in u"巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误":
+ self.trans[char] = u"wu"
+ for char in u"昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细":
+ self.trans[char] = u"xi"
+ for char in u"瞎虾匣霞辖暇峡侠狭下厦夏吓":
+ self.trans[char] = u"xia"
+ for char in u"掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线":
+ self.trans[char] = u"xian"
+ for char in u"相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象":
+ self.trans[char] = u"xiang"
+ for char in u"萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效":
+ self.trans[char] = u"xiao"
+ for char in u"楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑":
+ self.trans[char] = u"xie"
+ for char in u"薪芯锌欣辛新忻心信衅":
+ self.trans[char] = u"xin"
+ for char in u"星腥猩惺兴刑型形邢行醒幸杏性姓":
+ self.trans[char] = u"xing"
+ for char in u"兄凶胸匈汹雄熊":
+ self.trans[char] = u"xiong"
+ for char in u"休修羞朽嗅锈秀袖绣":
+ self.trans[char] = u"xiu"
+ for char in u"墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续":
+ self.trans[char] = u"xu"
+ for char in u"轩喧宣悬旋玄选癣眩绚":
+ self.trans[char] = u"xuan"
+ for char in u"靴薛学穴雪血":
+ self.trans[char] = u"xue"
+ for char in u"勋熏循旬询寻驯巡殉汛训讯逊迅":
+ self.trans[char] = u"xun"
+ for char in u"压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶":
+ self.trans[char] = u"ya"
+ for char in u"焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验":
+ self.trans[char] = u"yan"
+ for char in u"殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾":
+ self.trans[char] = u"yang"
+ for char in u"邀腰妖瑶摇尧遥窑谣姚咬舀药要耀":
+ self.trans[char] = u"yao"
+ for char in u"椰噎耶爷野冶也页掖业叶曳腋夜液":
+ self.trans[char] = u"ye"
+ for char in u"一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎":
+ self.trans[char] = u"yi"
+ for char in u"茵荫因殷音阴姻吟银淫寅饮尹引隐印":
+ self.trans[char] = u"yin"
+ for char in u"英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映":
+ self.trans[char] = u"ying"
+ for char in u"哟":
+ self.trans[char] = u"yo"
+ for char in u"拥佣臃痈庸雍踊蛹咏泳涌永恿勇用":
+ self.trans[char] = u"yong"
+ for char in u"幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂":
+ self.trans[char] = u"you"
+ for char in u"淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭":
+ self.trans[char] = u"yu"
+ for char in u"鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院":
+ self.trans[char] = u"yuan"
+ for char in u"曰约越跃钥岳粤月悦阅":
+ self.trans[char] = u"yue"
+ for char in u"耘云郧匀陨允运蕴酝晕韵孕":
+ self.trans[char] = u"yun"
+ for char in u"匝砸杂":
+ self.trans[char] = u"za"
+ for char in u"栽哉灾宰载再在":
+ self.trans[char] = u"zai"
+ for char in u"咱攒暂赞":
+ self.trans[char] = u"zan"
+ for char in u"赃脏葬":
+ self.trans[char] = u"zang"
+ for char in u"遭糟凿藻枣早澡蚤躁噪造皂灶燥":
+ self.trans[char] = u"zao"
+ for char in u"责择则泽":
+ self.trans[char] = u"ze"
+ for char in u"贼":
+ self.trans[char] = u"zei"
+ for char in u"怎":
+ self.trans[char] = u"zen"
+ for char in u"增憎曾赠":
+ self.trans[char] = u"zeng"
+ for char in u"扎喳渣札轧铡闸眨栅榨咋乍炸诈":
+ self.trans[char] = u"zha"
+ for char in u"摘斋宅窄债寨":
+ self.trans[char] = u"zhai"
+ for char in u"瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽":
+ self.trans[char] = u"zhan"
+ for char in u"樟章彰漳张掌涨杖丈帐账仗胀瘴障":
+ self.trans[char] = u"zhang"
+ for char in u"招昭找沼赵照罩兆肇召":
+ self.trans[char] = u"zhao"
+ for char in u"遮折哲蛰辙者锗蔗这浙":
+ self.trans[char] = u"zhe"
+ for char in u"珍斟真甄砧臻贞针侦枕疹诊震振镇阵圳":
+ self.trans[char] = u"zhen"
+ for char in u"蒸挣睁征狰争怔整拯正政帧症郑证":
+ self.trans[char] = u"zheng"
+ for char in u"芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒":
+ self.trans[char] = u"zhi"
+ for char in u"中盅忠钟衷终种肿重仲众":
+ self.trans[char] = u"zhong"
+ for char in u"舟周州洲诌粥轴肘帚咒皱宙昼骤":
+ self.trans[char] = u"zhou"
+ for char in u"珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻":
+ self.trans[char] = u"zhu"
+ for char in u"抓爪":
+ self.trans[char] = u"zhua"
+ for char in u"拽":
+ self.trans[char] = u"zhuai"
+ for char in u"专砖转撰赚篆":
+ self.trans[char] = u"zhuan"
+ for char in u"桩庄装妆撞壮状":
+ self.trans[char] = u"zhuang"
+ for char in u"椎锥追赘坠缀":
+ self.trans[char] = u"zhui"
+ for char in u"谆准":
+ self.trans[char] = u"zhun"
+ for char in u"捉拙卓桌琢茁酌啄着灼浊":
+ self.trans[char] = u"zhuo"
+ for char in u"兹咨资姿滋淄孜紫仔籽滓子自渍字":
+ self.trans[char] = u"zi"
+ for char in u"鬃棕踪宗综总纵":
+ self.trans[char] = u"zong"
+ for char in u"邹走奏揍":
+ self.trans[char] = u"zou"
+ for char in u"租足卒族祖诅阻组":
+ self.trans[char] = u"zu"
+ for char in u"钻纂":
+ self.trans[char] = u"zuan"
+ for char in u"嘴醉最罪":
+ self.trans[char] = u"zui"
+ for char in u"尊遵":
+ self.trans[char] = u"zun"
+ for char in u"昨左佐柞做作坐座":
+ self.trans[char] = u"zuo"
# from: https://www.wikidata.org/wiki/MediaWiki:Gadget-SimpleTransliterate.js
self.trans[u"ଂ"] = "anusvara"
self.trans[u"ઇ"] = "i"
--
To view, visit https://gerrit.wikimedia.org/r/157498
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5581662a46ed8b8e64c69a0c20f05ef7ff72895e
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Zhuyifei1999 <zhuyifei1999(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: get categories from wikitext in the AddCategory bot
......................................................................
get categories from wikitext in the AddCategory bot
Using the textlib.getCategoryLinks() function instead of the
Page.categories() method, to prevent transcluded categories
from being added directly to the page content.
This follows I05fa90523f718f09de83d03aab3bd9d031e7cbbb
bug: 58084
Change-Id: I900de3d9d1f30cbf2034e7e14f7127e08644f29e
---
M scripts/category.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Nullzero: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/category.py b/scripts/category.py
index cf07768..95817ae 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -377,7 +377,7 @@
return
# store old text, so we don't have reload it every time
old_text = text
- cats = [c for c in page.categories()]
+ cats = textlib.getCategoryLinks(text)
# Show the title of the page we're working on.
# Highlight the title in purple.
pywikibot.output(
--
To view, visit https://gerrit.wikimedia.org/r/157632
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I900de3d9d1f30cbf2034e7e14f7127e08644f29e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Nullzero <nullzero.free(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>