Skip to content

Commit ac9530f

Browse files
committed
Update pypin.
1 parent f8bffee commit ac9530f

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

generator.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# -*- coding: utf-8 -*-
22
import sys
33
import plistlib
4-
from pypinyin import lazy_pinyin, load_phrases_dict
4+
from pypinyin import lazy_pinyin
55
from jinja2 import Environment, FileSystemLoader
66

77

8-
def fix_pinyin():
9-
load_phrases_dict({u'狼': [[u'láng']]})
10-
11-
128
def get_readings(word, data):
139
if 'readings' in data:
1410
return ''.join(i for i in data['readings'] if not i.isdigit())
@@ -20,7 +16,6 @@ def main():
2016
if len(sys.argv) > 1:
2117
path = sys.argv[1]
2218
emoji = plistlib.readPlist(path)
23-
fix_pinyin()
2419
words = {}
2520
template_name = 'template.lua'
2621
env = Environment(loader=FileSystemLoader("./"), trim_blocks=True)

requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pypinyin
2-
jinja2
1+
pypinyin==0.5.3
2+
jinja2==2.7.3

0 commit comments

Comments
 (0)