Skip to content

Commit

Permalink
Auto merge of #27 - mozillazg:new-0.12.0, r=mozillazg
Browse files Browse the repository at this point in the history
v0.12.0
  • Loading branch information
homu committed Apr 25, 2017
2 parents 127001a + 71b61a5 commit ff1ea6f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Changelog


## 0.12.0 (2017-04-25)


* **NEW** 命令行程序支持通过 -s 指定新增的 `Tone3``FinalsTone3` 拼音风格

$ pinyin -s Tone3 请至少输入一个汉字
qing3 zhi4 shao3 shu1 ru4 yi1 ge4 han4 zi4

$ pinyin -s FinalsTone3 请至少输入一个汉字
ing3 i4 ao3 u1 u4 i1 e4 an4 i4

* **Changed** use [pinyin-data](https://github.com/mozillazg/pinyin-data) v0.4.1


## 0.11.0 (2016-10-28)

* **Changed** 不再使用 `0` 表示轻声(因为之前并没有正确的实现这个功能, 同时也觉得这个功能没必要)。
Expand Down
2 changes: 1 addition & 1 deletion pinyin.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

// Meta
const (
Version = "0.11.0"
Version = "0.12.0"
Author = "mozillazg, 闲耘"
License = "MIT"
Copyright = "Copyright (c) 2016 mozillazg, 闲耘"
Expand Down
6 changes: 5 additions & 1 deletion pinyin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

func main() {
heteronym := flag.Bool("e", false, "启用多音字模式")
style := flag.String("s", "Tone", "指定拼音风格。可选值:Normal, Tone, Tone2, Initials, FirstLetter, Finals, FinalsTone, FinalsTone2")
style := flag.String("s", "Tone", "指定拼音风格。可选值:Normal, Tone, Tone2, Tone3, Initials, FirstLetter, Finals, FinalsTone, FinalsTone2, FinalsTone3")
flag.Parse()
hans := flag.Args()
stdin := []byte{}
Expand All @@ -38,6 +38,8 @@ func main() {
args.Style = pinyin.Normal
case "Tone2":
args.Style = pinyin.Tone2
case "Tone3":
args.Style = pinyin.Tone3
case "Initials":
args.Style = pinyin.Initials
case "FirstLetter":
Expand All @@ -48,6 +50,8 @@ func main() {
args.Style = pinyin.FinalsTone
case "FinalsTone2":
args.Style = pinyin.FinalsTone2
case "FinalsTone3":
args.Style = pinyin.FinalsTone3
default:
args.Style = pinyin.Tone
}
Expand Down
4 changes: 2 additions & 2 deletions pinyin_dict.go
Original file line number Diff line number Diff line change
Expand Up @@ -8759,7 +8759,7 @@ var PinyinDict = map[int]string{
0x59B0: "zhuó",
0x59B1: "zhāo",
0x59B2: "dá",
0x59B3: "nǎi,nǐ",
0x59B3: "nǐ,nǎi",
0x59B4: "yuàn",
0x59B5: "tǒu",
0x59B6: "xián,xuán,xù",
Expand Down Expand Up @@ -23850,7 +23850,7 @@ var PinyinDict = map[int]string{
0x94AA: "kàng",
0x94AB: "fāng",
0x94AC: "huǒ",
0x94AD: "tǒu",
0x94AD: "tǒu,dǒu",
0x94AE: "niǔ",
0x94AF: "bǎ,pá",
0x94B0: "yù",
Expand Down
2 changes: 1 addition & 1 deletion tools/pinyin-data

0 comments on commit ff1ea6f

Please sign in to comment.