Skip to content

Commit ef787ec

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 713ca0d + 7a2d141 commit ef787ec

File tree

9 files changed

+54
-15
lines changed

9 files changed

+54
-15
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "21:00"
8+
open-pull-requests-limit: 10

.github/workflows/ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,22 @@ jobs:
1414

1515
build:
1616
name: Build
17-
runs-on: ${{ matrix.os }}
17+
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
os: [ubuntu-latest, macos-latest, windows-latest]
20+
go-version: [1.17, 1.18, 1.19, '1.20']
2121
steps:
2222

23-
- name: Set up Go 1.x
24-
uses: actions/setup-go@v2
23+
- name: Set up Go
24+
uses: actions/setup-go@v3
2525
with:
26-
go-version: ^1.17
26+
go-version: ${{ matrix.go-version }}
27+
env:
28+
GOPATH: ${{ env.HOME }}
2729
id: go
2830

2931
- name: Check out code into the Go module directory
30-
uses: actions/checkout@v2
32+
uses: actions/checkout@v3
3133

3234
- name: Get dependencies
3335
run: |
@@ -41,7 +43,7 @@ jobs:
4143

4244
- name: Test cmd
4345
run: |
44-
go get ./cmd/pinyin
45-
go run cmd/pinyin/main.go 测试
46-
go run cmd/pinyin/main.go -s zhao 测试
47-
echo 测试 | go run cmd/pinyin/main.go
46+
cd cli/pinyin/
47+
go run ./main.go 测试
48+
go run ./main.go -s zhao 测试
49+
echo 测试 | go run ./main.go

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
# Changelog
22

3+
## [0.20.0] (2023-05-14)
4+
5+
* **Changed** 使用 [pinyin-data][pinyin-data] v0.13.0 的拼音数据
6+
7+
38
## [0.19.0] (2021-12-11)
9+
410
* **Changed** 使用 [pinyin-data][pinyin-data] v0.12.0 的拼音数据
511

612

713
## [0.18.0] (2020-06-13)
14+
815
* **Changed** 使用 [pinyin-data][pinyin-data] v0.9.0 的拼音数据
916
* **Bugfixed** 修复自定义的 Fallback 函数可能会导致结果乱码的问题 Fixes [#35]
1017

@@ -238,3 +245,4 @@
238245
[0.17.0]: https://github.com/mozillazg/go-pinyin/compare/v0.16.0...v0.17.0
239246
[0.18.0]: https://github.com/mozillazg/go-pinyin/compare/v0.17.0...v0.18.0
240247
[0.19.0]: https://github.com/mozillazg/go-pinyin/compare/v0.18.0...v0.19.0
248+
[0.20.0]: https://github.com/mozillazg/go-pinyin/compare/v0.19.0...v0.20.0

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ Installation
1313
------------
1414

1515
```
16-
go get -u github.com/mozillazg/go-pinyin
16+
go get github.com/mozillazg/go-pinyin
1717
```
1818

1919
install CLI tool:
2020

2121
```
22-
go get -u github.com/mozillazg/go-pinyin/cmd/pinyin
22+
# go version>=1.17
23+
go install github.com/mozillazg/go-pinyin/cli/pinyin@latest
24+
25+
# go version<1.17
26+
go get -u github.com/mozillazg/go-pinyin/cli/pinyin
27+
2328
$ pinyin 中国人
2429
zhōng guó rén
2530
```
@@ -87,7 +92,7 @@ func main() {
8792
详见 [示例](https://godoc.org/github.com/mozillazg/go-pinyin#example-Pinyin--FallbackCustom1))。
8893
* 根据 [《汉语拼音方案》](http://www.moe.gov.cn/s78/A19/yxs_left/moe_810/s230/195802/t19580201_186000.html) y,w,ü (yu) 都不是声母,
8994
以及不是所有拼音都有声母,如果这不是你预期的话,你可能需要的是首字母风格 `FirstLetter`
90-
[详细信息](https://github.com/mozillazg/python-pinyin#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%B2%A1%E6%9C%89-y-w-yu-%E5%87%A0%E4%B8%AA%E5%A3%B0%E6%AF%8D) )。
95+
[详细信息](https://github.com/mozillazg/python-pinyin#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%B2%A1%E6%9C%89-y-w-yu-%E5%87%A0%E4%B8%AA%E5%A3%B0%E6%AF%8D) )。
9196

9297

9398
Related Projects

cli/pinyin/go.mod

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module github.com/mozillazg/go-pinyin/cli/pinyin
2+
3+
go 1.17
4+
5+
require (
6+
github.com/mattn/go-isatty v0.0.18
7+
github.com/mozillazg/go-pinyin v0.19.0
8+
)
9+
10+
require golang.org/x/sys v0.6.0 // indirect

cli/pinyin/go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98=
2+
github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
3+
github.com/mozillazg/go-pinyin v0.19.0 h1:p+J8/kjJ558KPvVGYLvqBhxf8jbZA2exSLCs2uUVN8c=
4+
github.com/mozillazg/go-pinyin v0.19.0/go.mod h1:iR4EnMMRXkfpFVV5FMi4FNB6wGq9NV6uDWbUuPhP4Yc=
5+
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
6+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
File renamed without changes.

pinyin_dict.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15779,7 +15779,7 @@ var PinyinDict = map[int]string{
1577915779
0x7517: "yǎn",
1578015780
0x7518: "gān,hān",
1578115781
0x7519: "dài",
15782-
0x751A: "shén,shèn",
15782+
0x751A: "shèn,shén",
1578315783
0x751B: "tián",
1578415784
0x751C: "tián",
1578515785
0x751D: "hán",

0 commit comments

Comments
 (0)