{"id":13481945,"url":"https://github.com/vinta/pangu","last_synced_at":"2025-08-22T05:32:22.295Z","repository":{"id":31425867,"uuid":"34989374","full_name":"vinta/pangu","owner":"vinta","description":"Paranoid text spacing in Go (Golang)","archived":false,"fork":false,"pushed_at":"2023-03-30T17:59:11.000Z","size":44,"stargazers_count":107,"open_issues_count":4,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-10T12:43:09.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/vinta/pangu","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ElemeFE/element","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-05-03T14:53:13.000Z","updated_at":"2024-11-18T04:32:10.000Z","dependencies_parsed_at":"2024-01-29T03:57:38.883Z","dependency_job_id":null,"html_url":"https://github.com/vinta/pangu","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinta%2Fpangu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinta%2Fpangu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinta%2Fpangu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinta%2Fpangu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinta","download_url":"https://codeload.github.com/vinta/pangu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230561014,"owners_count":18245324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:00:57.666Z","updated_at":"2024-12-20T09:07:26.773Z","avatar_url":"https://github.com/vinta.png","language":"Go","funding_links":[],"categories":["开源类库","Go","Open source library"],"sub_categories":["文本处理","Word Processing"],"readme":"pangu.go\n========\n\n[![](https://img.shields.io/badge/made%20with-%e2%9d%a4-ff69b4.svg?style=flat-square)](https://vinta.ws/code/)\n\nParanoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).\n\n- [pangu.go](https://github.com/vinta/pangu) (Go)\n- [pangu.java](https://github.com/vinta/pangu.java) (Java)\n- [pangu.js](https://github.com/vinta/pangu.js) (JavaScript)\n- [pangu.py](https://github.com/vinta/pangu.py) (Python)\n- [pangu.space](https://github.com/vinta/pangu.space) (Web API)\n\n## Installation\n\nTo install the package, `pangu`, for using in your Go programs:\n\n```console\n$ go get -u github.com/vinta/pangu\n```\n\nTo install the command-line tool, `pangu-axe`:\n\n```console\n$ go get -u github.com/vinta/pangu/pangu-axe\n```\n\n## Usage\n\n### Package\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/vinta/pangu\"\n)\n\nfunc main() {\n    s := pangu.SpacingText(\"當你凝視著bug，bug也凝視著你\")\n    fmt.Println(s)\n    // Output:\n    // 當你凝視著 bug，bug 也凝視著你\n}\n```\n\n### Command-line Interface\n\n```console\n$ pangu-axe text \"與PM戰鬥的人，應當小心自己不要成為PM\"\n與 PM 戰鬥的人，應當小心自己不要成為 PM\n\n$ pangu-axe file 銀河便車指南.txt\n$ pangu-axe file 宇宙盡頭的餐廳.txt -o 宇宙盡頭的餐廳（好讀版）.txt\n$ pangu-axe file 生命、宇宙及萬事萬物.txt 再見，謝謝你的魚.txt 基本無害.txt\n```\n\n## Documentation\n\n- `pangu` on [GoDoc](https://godoc.org/github.com/vinta/pangu)\n- `pangu-axe` on [GoDoc](https://godoc.org/github.com/vinta/pangu/pangu-axe)\n\nHave a question? Ask it on the [GitHub issues](https://github.com/vinta/pangu/issues)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinta%2Fpangu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinta%2Fpangu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinta%2Fpangu/lists"}