Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isaced/pangu.cr
Paranoid text spacing in Crystal
https://github.com/isaced/pangu.cr
crystal crystal-lang crystal-language crystal-shard
Last synced: about 1 month ago
JSON representation
Paranoid text spacing in Crystal
- Host: GitHub
- URL: https://github.com/isaced/pangu.cr
- Owner: isaced
- License: mit
- Created: 2019-02-11T07:59:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-02-11T12:09:24.000Z (over 5 years ago)
- Last Synced: 2024-05-01T12:59:20.996Z (4 months ago)
- Topics: crystal, crystal-lang, crystal-language, crystal-shard
- Language: Crystal
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - pangu.cr - Paranoid text spacing in Crystal (Misc)
README
# pangu [![Build Status](https://travis-ci.org/isaced/pangu.cr.svg?branch=master)](https://travis-ci.org/isaced/pangu.cr) [![GitHub releases](https://img.shields.io/github/release/isaced/pangu.cr.svg)](https://github.com/isaced/pangu.cr/releases)
Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).
This is the Crystal copy version from [bugtender/rangu](https://github.com/bugtender/rangu).
- Official supports:
- [pangu.go](https://github.com/vinta/pangu) (Go)
- [pangu.java](https://github.com/vinta/pangu.java) (Java)
- [pangu.js](https://github.com/vinta/pangu.js) (JavaScript)
- [pangu.py](https://github.com/vinta/pangu.py) (Python)
- [pangu.space](https://github.com/vinta/pangu.space) (Web API)- Community supports:
- [pangu.clj](https://github.com/coldnew/pangu.clj) (Clojure)
- [pangu.dart](https://github.com/SemonCat/pangu.dart) (Dart)
- [pangu.ex](https://github.com/cataska/pangu.ex) (Elixir)
- [pangu.objective-c](https://github.com/Cee/pangu.objective-c) (Objective-C)
- [pangu.php](https://github.com/Kunr/pangu.php) (PHP)
- [pangu.rb](https://github.com/dlackty/pangu.rb) (Ruby)
- [pangu.rs](https://github.com/airt/pangu.rs) (Rust)
- [pangu.swift](https://github.com/X140Yu/pangu.Swift) (Swift)
- [pangu.cr](https://github.com/isaced/pangu.cr) (Crystal)## Installation
Add the dependency to your `shard.yml`:
```yaml
dependencies:
pangu:
github: isaced/pangu.cr
```Run `shards install`
## Usage
```crystal
require "pangu"Pangu.spacing("當你凝視著bug,bug也凝視著你")
=> "當你凝視著 bug,bug 也凝視著你"Pangu.spacing("path/to/file.txt")
=> "與 PM 戰鬥的人,應當小心自己不要成為 PM"
```## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request