https://github.com/gbrlsnchs/kana
[mirror] CLI program for transliterating romaji text to either hiragana or katakana
https://github.com/gbrlsnchs/kana
hiragana japanese katakana romaji
Last synced: about 1 month ago
JSON representation
[mirror] CLI program for transliterating romaji text to either hiragana or katakana
- Host: GitHub
- URL: https://github.com/gbrlsnchs/kana
- Owner: gbrlsnchs
- License: mit
- Created: 2022-06-29T01:53:51.000Z (almost 3 years ago)
- Default Branch: trunk
- Last Pushed: 2023-02-10T22:12:16.000Z (over 2 years ago)
- Last Synced: 2025-04-12T14:11:13.185Z (about 2 months ago)
- Topics: hiragana, japanese, katakana, romaji
- Language: Zig
- Homepage: https://git.sr.ht/~gbrlsnchs/kana
- Size: 109 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## kana
kana is a CLI tool and also a library for transliterating romaji text to either hiragana
(ひらがな) or katakana (カタカナ).### Usage
The following snippets only shortly demonstrate the features. For a more thorough documentation,
see `kana(1)`.```shell
$ kana <<< 'ohayougozaimasu'
おはようございます
```#### Katakana
```shell
$ kana --katakana <<< 'suupa mario'
スーパ マリオ
```#### Extended katakana
```shell
$ kana --katakana --extended <<< 'supagetti'
スパゲッティ
```#### Punctuation marks
```shell
$ kana --punctuation <<< 'soudesune.'
そうですね。
$ kana --punctuation <<< 'kawaii~'
かわいい〜
$ kana --punctuation <<< 'nani?!'
なに?!
$ kana --punctuation <<< "'hiragana'"
「ひらがな」
$ kana --punctuation <<< '"katakana"'
『カタカナ』
$ kana --punctuation <<< '([{}])'
([{【すごい】}])
```#### Forcing prolongation (hiragana only)
```shell
$ kana --force-prolongation <<< 'raamen'
らーめん
```#### Toggling between kanas
```shell
$ kana --kana-toggle='@' <<< 'watashiha@gaburieru@desu'
わたしはガブリエルです
```#### Toggling between raw text and kanas
```shell
$ kana --raw-toggle='#' <<< 'watashiha#J-rock#gasukidesu'
わたしはJ-rockがすきです
```#### Resetting prolongation
```shell
$ kana --katakana --prolongation-reset='^' <<< 'Pikachu^u'
ピカチュウ
```#### Using small vowels
```shell
$ kana --katakana --vowel-shortener='_' <<< 'Keeshi_i'
ケーシィ
```#### Adding virtual stops
```shell
$ kana --katakana --virtual-stop='%' <<< 'U%u'
ウッウ
```### Contributing
[Use the mailing list](mailto:~gbrlsnchs/[email protected]) to
- Report issues
- Request new features
- Send patches
- Discuss development in generalIf applicable, a new ticket will be submitted by maintainers to [the issue
tracker](https://todo.sr.ht/~gbrlsnchs/kana) in order to track confirmed bugs or new features.### Building and distributing the project
This project is built entirely in Zig. Build it as you wish for local usage, and package it
to your distro of preference in accordance with its policy on how to package Zig projects.You can generate man pages in `doc/` by using [`scdoc`](https://git.sr.ht/~sircmpwn/scdoc).