From 06ffda9276f0509eada217e71339073925ecd56c Mon Sep 17 00:00:00 2001 From: Ronald Casili Date: Sat, 30 Jun 2018 12:55:06 +0800 Subject: [PATCH] Update readme --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/README.md b/README.md index c2a20d8..2ebbc3f 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,53 @@ A Cutter-Sanborn Four-Figure number generator +## CLI installation +Either install through npm: +``` +npm install -g cuttersanborn +``` +or download a standalone binary. + +## CLI usage help +``` +options: + --help + shows the help + + --file + A comma-separated list of names. + If is -, then input is read from stdin + + --outputname + Shows the name in output + + --name=lastname,firstname +``` + +### Example usage +``` +$ cuttersanborn --name=Adams,John --name=Gabel,Linda --name="Andrews, Mary Helen" +A214 +A216 +M393 + +$ cuttersanborn --outputName --name=Adams,John --name=Gabel,Linda +Adams,John A214 +Gabel,Linda A216 + +``` + + +## Npm installation and usage +Install on npm: +``` +$npm install --save cuttersanborn +``` + +Then require/import in your code: +``` +let generateCutter = await require("cuttersanborn")(); +let cutterNum = await generateCutter(lastname, firstname); + +``` +Note: the functions return a promise.