Skip to content

A Rust library and CLI tool for Farsi compound noun generation.

License

Notifications You must be signed in to change notification settings

mehdisadeghi/felfel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

felfel

A Rust library and CLI tool for Farsi compound noun generation.

This is a little piece of code that generates compound names in Farsi. Useful for naming things or anonymous visitors, or perhaps just for fun.

Usage

felfel is available both as a library as well as a little CLI tool.

Use as a CLI tool

# Install it
$ cargo install felfel

# Use it in command line
$ felfel --> hopefully will make you smile

Use as a library

Add this to your Cargo.toml:

[dependencies]
felfel = 0.1

Then invoke the gen or gen_id function:

use felfel;

fn main() {
	println!(felfel::gen());
}

Use as a WebAssembly package

felfel is compiled to Wasm and published to npm as a JavaScript package. First add it to your package.json:

# Add it to your program
$ npm install felfel

Then invoke the gen or gen_id function:

import * as felfel from "felfel";
console.log(felfel.gen_id()); // -> nahange-shaer-612

You can also use the output of wasm-pack build --target web and upload it somewhere. See wasm-bindgen book for more info.

Development

The only notable command worth mentioning is the generation of npm package:

# install wasm-pack
$ cargo install wasm-pack

# build the npm package
$ wasm-pack build --target nodejs

# publish the package
$ wasm-pack publish

License

felfel is distributed under MIT license.

About

A Rust library and CLI tool for Farsi compound noun generation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages