Skip to content

Commit b438540

Browse files
committed
- [#] update README
1 parent 664f147 commit b438540

2 files changed

Lines changed: 128 additions & 59 deletions

File tree

README.e.md

Lines changed: 60 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
---
2+
Owner: go-cc
23
ex1: cc2py -t 3 "中国人的〖中国银行〗,很.行.。"
34
ex2: echo "中国人的〖中国银行〗,很.行.。" | tee /tmp/pytest.txt | cc2py -t 1 -i
4-
ex3: cc2py -i /tmp/pytest.txt
5+
ex3: cc2py -i /tmp/pytest.txt -t 2
56
---
67

78
# {{.Name}}
89

9-
[![MIT License](http://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
10+
{{render "license/shields" . "License" "MIT"}}
1011
{{template "badge/godoc" .}}
1112
{{template "badge/goreport" .}}
12-
{{template "badge/travis" .}}
13+
[![Build Status](https://github.com/{{.Owner}}/{{.Name}}/actions/workflows/go-release-build.yml/badge.svg?branch=master)](https://github.com/{{.Owner}}/{{.Name}}/actions/workflows/go-release-build.yml)
14+
[![PoweredBy WireFrame](https://github.com/go-easygen/wireframe/blob/master/PoweredBy-WireFrame-B.svg)](http://godoc.org/github.com/go-easygen/wireframe)
1315

1416
{{pkgdoc}}
1517

1618
## {{toc 5}}
1719

18-
# {{.Name}} - Chinese-Character to Pinyin converter
20+
## {{.Name}} - Chinese-Character to Pinyin converter
1921

2022
`{{.Name}}` will convert Chinese-Character to pinyin.
2123

22-
# Usage
24+
## Usage
2325

24-
#### $ {{exec "cc2py" | color "sh"}}
26+
### $ {{exec "cc2py" | color "sh"}}
2527

26-
## Examples
28+
### Examples
2729

2830
```sh
2931
$ {{shell .ex1}}
@@ -34,48 +36,80 @@ $ {{shell .ex3}}
3436

3537
$ {{shell "cc2py -i /tmp/pytest.txt -p -t 3"}}
3638

37-
$ {{shell "cc2py -i /tmp/pytest.txt -l 2 -c "}}
39+
$ {{shell "cc2py -i /tmp/pytest.txt -l 1 -c "}}
3840

39-
$ {{shell "cc2py -i /tmp/pytest.txt -l 1 -s '' -c "}}
41+
$ {{shell "cc2py -i /tmp/pytest.txt -l 2 -s '' -c "}}
4042
```
4143

44+
## Download/install binaries
45+
46+
- The latest binary executables are available
47+
as the result of the Continuous-Integration (CI) process.
48+
- I.e., they are built automatically right from the source code at every git release by [GitHub Actions](https://docs.github.com/en/actions).
49+
- There are two ways to get/install such binary executables
50+
* Using the **binary executables** directly, or
51+
* Using **packages** for your distro
52+
53+
### The binary executables
54+
55+
- The latest binary executables are directly available under
56+
https://github.com/{{.Owner}}/{{.Name}}/releases/latest
57+
- Pick & choose the one that suits your OS and its architecture. E.g., for Linux, it would be the `{{.Name}}_verxx_linux_amd64.tar.gz` file.
58+
- Available OS for binary executables are
59+
* Linux
60+
* Mac OS (darwin)
61+
* Windows
62+
- If your OS and its architecture is not available in the download list, please let me know and I'll add it.
63+
- The manual installation is just to unpack it and move/copy the binary executable to somewhere in `PATH`. For example,
64+
65+
``` sh
66+
tar -xvf {{.Name}}_*_linux_amd64.tar.gz
67+
sudo mv -v {{.Name}}_*_linux_amd64/{{.Name}} /usr/local/bin/
68+
rmdir -v {{.Name}}_*_linux_amd64
69+
```
4270

43-
# Download binaries
4471

45-
- The latest binary executables are available under
46-
https://bintray.com/suntong/bin/{{.Name}}#files/{{.Name}}
47-
as the result of the Continuous-Integration process.
48-
- 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.
49-
- Pick & choose the binary executable that suits your OS and its architecture. E.g., for Linux, it would most probably be the `{{.Name}}-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.
50-
- You may want to rename it to a shorter name instead, e.g., `{{.Name}}`, after downloading it. To do the downloading and renaming programatically, use the plain-downloading url
51-
https://dl.bintray.com/suntong/bin/{{.Name}}.
72+
### Distro package
5273

74+
- Packages available for Linux distros are
75+
* [Alpine Linux](https://cloudsmith.io/~suntong/repos/repo/setup/#formats-alpine)
76+
* [Debian](https://cloudsmith.io/~suntong/repos/repo/setup/#formats-deb)
77+
* [RedHat](https://cloudsmith.io/~suntong/repos/repo/setup/#formats-rpm)
5378

54-
# Debian package
79+
The repo setup instruction url has been given above.
80+
For example, for [Debian](https://cloudsmith.io/~suntong/repos/repo/setup/#formats-deb) --
5581

56-
Available at https://dl.bintray.com/suntong/deb.
82+
### Debian package
5783

58-
```
59-
echo "deb [trusted=yes] https://dl.bintray.com/suntong/deb all main" | sudo tee /etc/apt/sources.list.d/suntong-debs.list
60-
sudo apt-get update
6184

62-
sudo chmod 644 /etc/apt/sources.list.d/suntong-debs.list
85+
```sh
86+
curl -1sLf \
87+
'https://dl.cloudsmith.io/public/suntong/repo/setup.deb.sh' \
88+
| sudo -E bash
89+
90+
# That's it. You then can do your normal operations, like
91+
92+
sudo apt-get update
6393
apt-cache policy {{.Name}}
6494

6595
sudo apt-get install -y {{.Name}}
6696
```
6797

68-
# Install Source
98+
## Install Source
6999

70100
To install the source code instead:
71101

72102
```
73-
go get github.com/go-cc/cc2py
103+
go get -v -u github.com/{{.Owner}}/{{.Name}}
74104
```
75105

76-
# Author
106+
## Author
77107

78108
Tong SUN
79109
![suntong from cpan.org](https://img.shields.io/badge/suntong-%40cpan.org-lightgrey.svg "suntong from cpan.org")
80110

111+
_Powered by_ [**WireFrame**](https://github.com/go-easygen/wireframe)
112+
[![PoweredBy WireFrame](https://github.com/go-easygen/wireframe/blob/master/PoweredBy-WireFrame-Y.svg)](http://godoc.org/github.com/go-easygen/wireframe)
113+
the _one-stop wire-framing solution_ for Go cli based projects, from _init_ to _deploy_.
114+
81115
All patches welcome.

README.md

Lines changed: 68 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
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

@@ -13,22 +14,24 @@
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
3033
Chinese-Character to Pinyin converter
31-
built on 2017-05-05
34+
built on 2021-12-18
3235

3336
Converter 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
6265
zhong1 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í 〖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ì 〖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
98129
apt-cache policy cc2py
99130
100131
sudo apt-get install -y cc2py
101132
```
102133

103-
# Install Source
134+
## Install Source
104135

105136
To 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

113144
Tong 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+
116151
All patches welcome.

0 commit comments

Comments
 (0)