Skip to content

Commit

Permalink
Rename longbridgeapp to longbridge. (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee authored Dec 13, 2024
1 parent fc69704 commit a2e0c60
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 249 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,19 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14
go-version: 1.21
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Get dependencies
run: |
if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
go get github.com/axw/gocov/gocov
go get github.com/mattn/goveralls
go get ./cmd/pinyin
- name: Check Code
uses: actions/checkout@v4

- name: Test
run: |
go run cmd/pinyin/main.go abc
go run cmd/pinyin/main.go -s zhao abc
echo "abc" | go run cmd/pinyin/main.go
echo "abc" > abc.txt && go run cmd/pinyin/main.go < abc.txt
make test
221 changes: 0 additions & 221 deletions CHANGELOG.md

This file was deleted.

16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# go-pinyin

[![Go](https://github.com/longbridgeapp/go-pinyin/actions/workflows/go.yml/badge.svg)](https://github.com/longbridgeapp/go-pinyin/actions/workflows/go.yml)
[![Go](https://github.com/longbridge/go-pinyin/actions/workflows/go.yml/badge.svg)](https://github.com/longbridge/go-pinyin/actions/workflows/go.yml)

汉语拼音转换工具 Go 版。

Expand All @@ -9,21 +9,21 @@
## Installation

```
go get -u github.com/longbridgeapp/go-pinyin
go get -u github.com/longbridge/go-pinyin
```

install CLI tool:

```
go get -u github.com/longbridgeapp/go-pinyin/cmd/pinyin
go get -u github.com/longbridge/go-pinyin/cmd/pinyin
$ pinyin 中国人
zhōng guó rén
```

## Documentation

API documentation can be found here:
https://pkg.go.dev/github.com/longbridgeapp/go-pinyin
https://pkg.go.dev/github.com/longbridge/go-pinyin

## Usage

Expand All @@ -32,7 +32,7 @@ package main

import (
"fmt"
"github.com/longbridgeapp/go-pinyin"
"github.com/longbridge/go-pinyin"
)

func main() {
Expand Down Expand Up @@ -79,11 +79,11 @@ func main() {

注意:

* 默认情况下会忽略没有拼音的字符(可以通过自定义 `Fallback` 参数的值来自定义如何处理没有拼音的字符,
- 默认情况下会忽略没有拼音的字符(可以通过自定义 `Fallback` 参数的值来自定义如何处理没有拼音的字符,
详见 [示例](https://godoc.org/github.com/mozillazg/go-pinyin#example-Pinyin--FallbackCustom1))。
* 根据 [《汉语拼音方案》](http://www.moe.gov.cn/s78/A19/yxs_left/moe_810/s230/195802/t19580201_186000.html) y,w,ü (yu) 都不是声母,
- 根据 [《汉语拼音方案》](http://www.moe.gov.cn/s78/A19/yxs_left/moe_810/s230/195802/t19580201_186000.html) y,w,ü (yu) 都不是声母,
以及不是所有拼音都有声母,如果这不是你预期的话,你可能需要的是首字母风格 `FirstLetter`
[详细信息](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) )。
[详细信息](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) )。

## Related Projects

Expand Down
2 changes: 1 addition & 1 deletion cmd/pinyin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"strings"

"github.com/longbridgeapp/go-pinyin"
"github.com/longbridge/go-pinyin"
"github.com/mattn/go-isatty"
)

Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Usage
import (
"fmt"
"github.com/longbridgeapp/go-pinyin"
"github.com/longbridge/go-pinyin"
)
func main() {
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pinyin_test
import (
"fmt"

"github.com/longbridgeapp/go-pinyin"
"github.com/longbridge/go-pinyin"
)

func ExampleConvert() {
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/longbridgeapp/go-pinyin
module github.com/longbridge/go-pinyin

go 1.13
go 1.18

require (
github.com/mattn/go-isatty v0.0.10
github.com/yanyiwu/gojieba v1.1.0
github.com/yanyiwu/gojieba v1.4.4
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW1
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
github.com/yanyiwu/gojieba v1.1.0 h1:rx+kNP0L7zn+4Zyo1d8aLCfXt3BmIkWQ26FCbGnw1bc=
github.com/yanyiwu/gojieba v1.1.0/go.mod h1:0AAj9tOG6WWXQ5FNffl4ruBy/hP7bHl2gs+YiDi1aYs=
github.com/yanyiwu/gojieba v1.4.4 h1:Iukkf8WlIfqAKtsGZjUhGR1ArKa7DtLDNmW8bvUI8JI=
github.com/yanyiwu/gojieba v1.4.4/go.mod h1:JUq4DddFVGdHXJHxxepxRmhrKlDpaBxR8O28v6fKYLY=
golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

0 comments on commit a2e0c60

Please sign in to comment.