A command line to to convert hans to pinyin
Go to file
Lunny Xiao db079e86cc
All checks were successful
continuous-integration/drone/push Build is passing
fix README
2019-06-26 16:32:29 +08:00
.drone.yml update README and drone 2019-06-26 16:24:32 +08:00
.gitignore update README and drone 2019-06-26 16:24:32 +08:00
LICENSE add license 2019-06-26 16:30:33 +08:00
main.go init project 2018-10-02 12:40:03 +08:00
README.md fix README 2019-06-26 16:32:29 +08:00

chapinyin

Build Status

This command tool will convert hans to pinyin depends on github.com/mozillazg/go-pinyin.

Installation

go get gitea.com/lunny/chapinyin

Usage

chapinyin <汉字1> <汉字2>
chapinyin -style=tone3 <汉字1> <汉字2>

Style lists

  • Normal = 0 // 普通风格,不带声调(默认风格)。如: zhong guo
  • Tone = 1 // 声调风格1拼音声调在韵母第一个字母上。如 zhōng guó
  • Tone2 = 2 // 声调风格2即拼音声调在各个韵母之后用数字 [1-4] 进行表示。如: zho1ng guo2
  • Tone3 = 8 // 声调风格3即拼音声调在各个拼音之后用数字 [1-4] 进行表示。如: zhong1 guo2
  • Initials = 3 // 声母风格,只返回各个拼音的声母部分。如: zh g
  • FirstLetter = 4 // 首字母风格,只返回拼音的首字母部分。如: z g
  • Finals = 5 // 韵母风格,只返回各个拼音的韵母部分,不带声调。如: ong uo
  • FinalsTone = 6 // 韵母风格1带声调声调在韵母第一个字母上。如 ōng uó
  • FinalsTone2 = 7 // 韵母风格2带声调声调在各个韵母之后用数字 [1-4] 进行表示。如: o1ng uo2
  • FinalsTone3 = 9 // 韵母风格3带声调声调在各个拼音之后用数字 [1-4] 进行表示。如: ong1 uo2