Kana - a small CLI program for transliterating romaji text to either hiragana (ひらがな) or katakana (カタカナ).

Overview

Kana

About

Kana is a small CLI program for transliterating romaji text to either hiragana (ひらがな) or katakana (カタカナ).

How it works

Internally, it uses a finite-state machine in order to parse everything correctly and in the right order.

Examples

Simple usage

$ kana ohayougozaimasu
おはようございます
$ kana --katakana suupaa mario
スーパー マリオ

Toggling between kanas

It's possible to toggle between kanas if a toggle char is informed to --toggle-char. Whenever the parser hits the informed char, it will toggle between kanas, using the other variant until it hits that char again, then toggling back to the previous variant, and so on:

$ kana --toggle-char=@ watashiha@gaburieru@desu
わたしはガブリエルです

Transliterating a multi-line file

Kana can't read files, so it is necessary to pipe files through something like xargs:

$ cat file.txt
hajimemashite
@gaburieru@tomoshimasu
douzoyoroshikuonegaishimasu

$ cat file.txt | xargs --max-lines=1 kana --toggle-char=@
はじめまして
ガブリエルともします
どうぞよろしくおねがいします

Building from source

Since this project is written in Rust, you need to build it with cargo:

$ cargo build --release --frozen

Shell completions are generated during build and stored in target/completions after it's finished.

Note

Some few monographs are not implemented due to being redundant or generally unused.

You might also like...
zman is a CLI year (time) progress that small, fast, and just one single binary.
zman is a CLI year (time) progress that small, fast, and just one single binary.

zman zman is a CLI year (time) progress that small, fast, and just one single binary. Features Show year progress Show month, and week progress Show r

Cornucopia is a small CLI utility resting on tokio-postgres and designed to facilitate PostgreSQL workflows in Rust

Cornucopia Generate type checked Rust from your SQL Install | Example Cornucopia is a small CLI utility resting on tokio-postgres and designed to faci

A small CLI tool to query ArcGIS REST API services, implemented in Rust. The server response is returned as pretty JSON.

A small CLI tool to query ArcGIS REST API services, implemented in Rust. The server response is returned as pretty JSON.

A small cli demo of rust&wasm hostcall framework.

A Cli Example for Rust and WebAssembly Hostcall Usage # build wasms for ervery module in the `wasm` directory and move them to the root directory # ex

Yet Another Texture Packer - a small and simple CLI application to pack multiple textures/sprites into a texture atlas/sprite sheet

YATP (Yet Another Texture Packer) A small and simple CLI application to pack multiple textures/sprites into a texture atlas/sprite sheet. Installation

call-me-maybe is a small CLI tool to notify you of the completion of a command

call-me-maybe call-me-maybe is a small CLI tool to notify you of the completion of a command By default, the tools consumes stdin for a message's cont

A lightweight and super fast cli todo program written in rust under 200 sloc
A lightweight and super fast cli todo program written in rust under 200 sloc

todo A lightweight and super fast cli todo program written in rust under 200 sloc installation AUR package: todo-bin use cargo build --release to comp

CLI program for building generative projects

NFT image generator This is the project to help artists to generate NFT collection, which can be generated from layers of PNG images. Usage Get archiv

A template with cookie cutter CLI, Program and Integration tests for Solana blockchain
A template with cookie cutter CLI, Program and Integration tests for Solana blockchain

About solana-cli-program template is a sample app demonstrating the creation of a minimal CLI application written in Rust to interact with Solana and

Owner
Gabriel Sanches
Vegan for life.
Gabriel Sanches
An implementation of Piet's text interface using cosmic-text

piet-cosmic-text Implements piet's Text interface using the cosmic-text crate. License piet-cosmic-text is free software: you can redistribute it and/

John Nunley 7 Mar 12, 2023
A small script in rust to get the cpu usage in %'s with a gradient color for the text

cpu_usage-polybar A small script in rust to get the cpu usage in %'s with a gradient color for the text To get it to work on your PC you will have to

Sara 4 Apr 18, 2023
A little program written in Rust that prints random PNG images to the terminal in text grabbed from an image repo.

Cermic A little program written in Rust that prints random PNG images to the terminal in text grabbed from an image repo. NOTE: As of right now, Cermi

Jackson Novak 7 Oct 1, 2022
A small program which makes a rofi game launcher menu possible by creating .desktop entries for games

rofi-games A small program which makes a `rofi` game launcher menu possible by creating `.desktop` entries for games Installation Manual Clone repo: g

Rolv Apneseth 20 May 4, 2023
A simple program for C program IO testing. Written in Rust

A simple program for C program IO testing. Written in Rust, using concurrency to speed up valgrind testing. Make sure to update settings at your first run of the program!

null 1 Feb 22, 2022
Text-based to-do management CLI & language server

☑️ Todome (日本語版はこちら) Todome is a notation developed for making and editing to-do lists. It is inspired by Todo.txt, and in fact some of the todome not

monaqa 16 Aug 17, 2022
A simple (but really fast!) CLI tool to convert an epub into a text file.

epub_to_txt A simple (but really fast!) CLI tool written in Rust to convert an epub into a text file (in Markdown format). Usage epub_to_txt filename.

Darren Mothersele 3 Jul 30, 2023
Small CLI for escaping and unescaping characters in strings

?? esc Small CLI for escaping characters in strings. Install cargo install esc Usage cat LICENSE-MIT | esc escape | pbcopy pbpaste | esc unescape | pb

Seth 1 Nov 26, 2021
A small CLI wrapper for authenticating with SSH keys from Hashicorp Vault

vaultssh A small CLI wrapper for authenticating with SSH keys from Hashicorp Vault vaultssh is a small CLI wrapper for automatically fetching and usin

Joshua Gilman 50 Dec 10, 2022
Small and simple CLI app to generate .editorconfig based on a given settings.

add-editorconfig Small and simple CLI app to generate .editorconfig based on a given settings. Usage # Will create an .editorconfig in the current dir

Reinaldy Rafli 3 Jan 16, 2022