44[ ![ MIT License] ( http://img.shields.io/badge/License-MIT-blue.svg )] ( LICENSE )
55[ ![ GoDoc] ( https://godoc.org/github.com/go-cc/cc2py?status.svg )] ( http://godoc.org/github.com/go-cc/cc2py )
66[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/go-cc/cc2py )] ( https://goreportcard.com/report/github.com/go-cc/cc2py )
7- [ ![ travis Status] ( https://travis-ci.org/go-cc/cc2py.svg?branch=master )] ( https://travis-ci.org/go-cc/cc2py )
7+ [ ![ Build Status] ( https://github.com/go-cc/cc2py/actions/workflows/go-release-build.yml/badge.svg?branch=master )] ( https://github.com/go-cc/cc2py/actions/workflows/go-release-build.yml )
8+ [ ![ PoweredBy WireFrame] ( https://github.com/go-easygen/wireframe/blob/master/PoweredBy-WireFrame-B.svg )] ( http://godoc.org/github.com/go-easygen/wireframe )
89
910汉语拼音转换工具.
1011
1314- [ cc2py - Chinese-Character to Pinyin converter] ( #cc2py---chinese-character-to-pinyin-converter )
1415- [ Usage] ( #usage )
1516 - [ $ cc2py] ( #-cc2py )
16- - [ Examples] ( #examples )
17- - [ Download binaries] ( #download-binaries )
18- - [ Debian package] ( #debian-package )
17+ - [ Examples] ( #examples )
18+ - [ Download/install binaries] ( #downloadinstall-binaries )
19+ - [ The binary executables] ( #the-binary-executables )
20+ - [ Distro package] ( #distro-package )
21+ - [ Debian package] ( #debian-package )
1922- [ Install Source] ( #install-source )
2023- [ Author] ( #author )
2124
22- # cc2py - Chinese-Character to Pinyin converter
25+ ## cc2py - Chinese-Character to Pinyin converter
2326
2427` cc2py ` will convert Chinese-Character to pinyin.
2528
26- # Usage
29+ ## Usage
2730
28- #### $ cc2py
31+ ### $ cc2py
2932``` sh
3033Chinese-Character to Pinyin converter
31- built on 2017-05-05
34+ built on 2021-12-18
3235
3336Converter Chinese to pinyin in different ways
3437
@@ -52,7 +55,7 @@ Options:
5255 -c, --capitalized capitalized each pinyin word
5356` ` `
5457
55- # # Examples
58+ # ## Examples
5659
5760` ` ` sh
5861$ cc2py -t 3 " 中国人的〖中国银行〗,很.行.。"
@@ -61,56 +64,88 @@ zhōng guó rén de 〖zhōng guó yín xíng 〗,hěn .xíng .。
6164$ echo " 中国人的〖中国银行〗,很.行.。" | tee /tmp/pytest.txt | cc2py -t 1 -i
6265zhong1 guo2 ren2 de 〖zhong1 guo2 yin2 xing2 〗,hen3 .xing2 .。
6366
64- $ cc2py -i /tmp/pytest.txt
65- zhong guo ren de 〖zhong guo yin xing 〗,hen .xing .。
67+ $ cc2py -i /tmp/pytest.txt -t 2
68+ zho1ng guo2 re2n de 〖zho1ng guo2 yi2n xi2ng 〗,he3n .xi2ng .。
6669
6770$ cc2py -i /tmp/pytest.txt -p -t 3
68- zhōng/zhòng guó rén de/dì /dí 〖zhōng/zhòng guó yín xíng/háng/xìng/hàng/héng 〗,hěn .xíng/háng/xìng/hàng/héng .。
71+ zhōng/zhòng guó rén de/dī /dí/dì 〖zhōng/zhòng guó yín xíng/háng/héng/ xìng/hàng 〗,hěn .xíng/háng/héng/ xìng/hàng .。
6972
70- $ cc2py -i /tmp/pytest.txt -l 2 -c
71- Zh G R D 〖Zh G Y X 〗,H .X .。
73+ $ cc2py -i /tmp/pytest.txt -l 1 -c
74+ Z G R D 〖Z G Y X 〗,H .X .。
7275
73- $ cc2py -i /tmp/pytest.txt -l 1 -s ' ' -c
74- ZGRD〖ZGYX 〗,H.X.。
76+ $ cc2py -i /tmp/pytest.txt -l 2 -s ' ' -c
77+ ZhGRD〖ZhGYX 〗,H.X.。
7578` ` `
7679
80+ # # Download/install binaries
81+
82+ - The latest binary executables are available
83+ as the result of the Continuous-Integration (CI) process.
84+ - I.e., they are built automatically right from the source code at every git release by [GitHub Actions](https://docs.github.com/en/actions).
85+ - There are two ways to get/install such binary executables
86+ * Using the ** binary executables** directly, or
87+ * Using ** packages** for your distro
88+
89+ # ## The binary executables
90+
91+ - The latest binary executables are directly available under
92+ https://github.com/go-cc/cc2py/releases/latest
93+ - Pick & choose the one that suits your OS and its architecture. E.g., for Linux, it would be the ` cc2py_verxx_linux_amd64.tar.gz` file.
94+ - Available OS for binary executables are
95+ * Linux
96+ * Mac OS (darwin)
97+ * Windows
98+ - If your OS and its architecture is not available in the download list, please let me know and I' ll add it.
99+ - The manual installation is just to unpack it and move/copy the binary executable to somewhere in `PATH`. For example,
100+
101+ ``` sh
102+ tar -xvf cc2py_*_linux_amd64.tar.gz
103+ sudo mv -v cc2py_*_linux_amd64/cc2py /usr/local/bin/
104+ rmdir -v cc2py_*_linux_amd64
105+ ```
77106
78- # Download binaries
79107
80- - The latest binary executables are available under
81- https://bintray.com/suntong/bin/cc2py#files/cc2py
82- as the result of the Continuous-Integration process.
83- - I.e., they are built right from the source code during every git commit automatically by [travis-ci](https://travis-ci.org/), thus are always the latest.
84- - Pick & choose the binary executable that suits your OS and its architecture. E.g., for Linux, it would most probably be the `cc2py-linux-amd64` file. If your OS and its architecture is not available in the download list, please let me know and I' ll add it.
85- - You may want to rename it to a shorter name instead, e.g., `cc2py`, after downloading it. To do the downloading and renaming programatically, use the plain-downloading url
86- https://dl.bintray.com/suntong/bin/cc2py.
108+ ### Distro package
87109
110+ - Packages available for Linux distros are
111+ * [Alpine Linux](https://cloudsmith.io/~suntong/repos/repo/setup/#formats-alpine)
112+ * [Debian](https://cloudsmith.io/~suntong/repos/repo/setup/#formats-deb)
113+ * [RedHat](https://cloudsmith.io/~suntong/repos/repo/setup/#formats-rpm)
88114
89- # Debian package
115+ The repo setup instruction url has been given above.
116+ For example, for [Debian](https://cloudsmith.io/~suntong/repos/repo/setup/#formats-deb) --
90117
91- Available at https://dl.bintray.com/suntong/deb.
118+ ### Debian package
92119
93- ```
94- echo "deb [trusted=yes] https://dl.bintray.com/suntong/deb all main" | sudo tee /etc/apt/sources.list.d/suntong-debs.list
95- sudo apt-get update
96120
97- sudo chmod 644 /etc/apt/sources.list.d/suntong-debs.list
121+ ```sh
122+ curl -1sLf \
123+ ' https://dl.cloudsmith.io/public/suntong/repo/setup.deb.sh' \
124+ | sudo -E bash
125+
126+ # That' s it. You then can do your normal operations, like
127+
128+ sudo apt-get update
98129apt-cache policy cc2py
99130
100131sudo apt-get install -y cc2py
101132` ` `
102133
103- # Install Source
134+ # # Install Source
104135
105136To install the source code instead:
106137
107138` ` `
108- go get github.com/go-cc/cc2py
139+ go get -v -u github.com/go-cc/cc2py
109140` ` `
110141
111- # Author
142+ # # Author
112143
113144Tong SUN
114145! [suntong from cpan.org](https://img.shields.io/badge/suntong-%40cpan.org-lightgrey.svg " suntong from cpan.org" )
115146
147+ _Powered by_ [** WireFrame** ](https://github.com/go-easygen/wireframe)
148+ [! [PoweredBy WireFrame](https://github.com/go-easygen/wireframe/blob/master/PoweredBy-WireFrame-Y.svg)](http://godoc.org/github.com/go-easygen/wireframe)
149+ the _one-stop wire-framing solution_ for Go cli based projects, from _init_ to _deploy_.
150+
116151All patches welcome.
0 commit comments