From f4b4c8821d1b85e6de5f72e268d1e2b92a10d013 Mon Sep 17 00:00:00 2001 From: Aslam Ahammed Date: Thu, 12 Mar 2020 16:49:06 +0530 Subject: [PATCH] Update package information --- Cargo.toml | 2 ++ README.md | 25 ++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 05d3ea3..457dcd4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,8 @@ name = "unicode-to-mltt-converter" version = "0.1.0" authors = ["Aslam Ahammed "] edition = "2018" +repository = "https://github.com/aslamplr/unicode-to-mltt-converter" +license = "(MIT OR Apache-2.0)" [lib] crate-type = ["cdylib", "rlib"] diff --git a/README.md b/README.md index 8fe3998..61d1eb9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +Malayalam unicode to mltt converter +

Malayalam unicode to mltt converter

@@ -10,7 +12,21 @@ ## ๐Ÿšด Usage -### ๐Ÿ–ฅ Run CLI util +### ๐ŸŒŽ Web example + +Requires bundler such as webpack with appropriate wasm loaders to consume the library. +See the example in `www` directory for complete web application. + +```javascript +import * as mlttConverter from 'unicode-to-mltt-converter'; + +fetch("www/public/karthika.map").then((resp) => resp.text()).then((defaultCharmapVal) => { + mlttConverter.convert(inputValue, defaultCharmapVal); +}); + +``` + +### ๐Ÿ–ฅ Run Rust ๐Ÿฆ€ CLI util ``` cargo run -- www/public/karthika.map "เดชเดถเตเดšเดฟเดฎเด˜เดŸเตเดŸเดคเตเดคเดฟเดฒเต† เดšเตเดฐเตเด•เตเด•เด‚ เดธเตเดฅเดฒเด™เตเด™เดณเดฟเตฝ เดฎเดพเดคเตเดฐเด‚ เดตเดฟเดฐเดณเดฎเดพเดฏเดฟ เด•เดพเดฃเดชเตเดชเต†เดŸเตเดจเตเดจ เด’เดฐเดฟเดจเด‚ เดชเต‚เดฎเตเดชเดพเดฑเตเดฑเดฏเดพเดฃเต เดฎเดฒเดฌเดพเตผ เดฎเดฟเดจเตเดจเตป" @@ -38,3 +54,10 @@ wasm-pack test --headless --firefox ``` ## ๐Ÿ•ธ Web Application using React is in the `www` directory inside this repo. Separate `README.md` included for `www`. + + +## Development dependencies + +- rustc 1.41.1 +- wasm-pack 0.9.1 +- node v13.7.0