1 unstable release
Uses old Rust 2015
0.0.1 | Jan 18, 2017 |
---|
#6 in #romaji
2KB
Japanese Writing System Converter
Table of Contents
Components
There are several crates in this repo.
Folder | Contents |
---|---|
core | all conversion functions |
cli | simple CLI wrapper of core |
ffi | static/dynamic library for using from different languages (including C header) |
- For using in other Rust projects, use core (jwconv in crates.io).
- For using in CLI, use cli (jwconv-cli in crates.io).
- For using in other languages, use ffi (jwconv-ffi in crates.io).
Installation (CLI)
From Source
$ git clone https://github.com/wdv4758h/jwconv $ cargo install --path jwconv/cli
Usage (CLI)
$ jwconv hana はな $ jwconv taiwan たいわん $ jwconv -m r2k hana ハナ $ jwconv -m r2k taiwan タイワン
FFI Examples
C
There is a C header in ffi/include/, and an example in ffi/examples/.
To run the example:
$ git clone git://github.com/wdv4758h/jwconv $ cd jwconv/ffi/examples/ $ make all # build & run
Python
There is a Python wrapper by using CFFI in ffi/bindings/python/cffi/.
To try the wrapper:
$ git clone git://github.com/wdv4758h/jwconv $ cd jwconv/ffi/ $ cargo build --release $ python -i bindings/python/cffi/jwconv.py >>> romaji_to_katakana("taiwan") 'タイワン' >>>
License
jwconv is icensed under the Apache-2.0 License - see the LICENSE file for details
Dependencies
~2MB
~29K SLoC