diff --git a/README.md b/README.md index 6ebc49b..3d7e21d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## About -`uni` is an application that displays Unicode code points for glyphs that are either included as arguments on the command line or piped through the standard input stream to the `uni` executable. +`uni` is a command line application that performs glyph based searches for Unicode v9.0.0 defined code points and Unicode code point based searches for glyphs. uni Argument Example @@ -56,7 +56,22 @@ $ rm $(which uni) ## Usage -### Glyphs as arguments to `uni` +### Default behavior + +By default, `uni` performs a search for Unicode code points with glyph arguments. You can reverse this search behavior to identify glyphs with Unicode code point search strings by including the `-g` / `--glyph` option in your command. + +### Options + +``` + -g, --glyph Search for glyph(s) with Unicode code point(s) + -h, --help Application help + --usage Application usage + -v, --version Application version +``` + +### Search for Unicode Code Points with Glyphs + +#### Glyphs as arguments to `uni` `uni` takes glyph arguments and displays the associated Unicode code points. You can include the glyphs in a single string or separate them with spaces. Use quotes around special shell characters. @@ -64,7 +79,7 @@ $ rm $(which uni) $ uni [glyph 1]...[glyph n] ``` -#### Example +##### Example ``` $ uni Aa1Ø€βф▀र༩↵√ナ @@ -83,10 +98,14 @@ U+221A '√' U+30CA 'ナ' ``` -### Glyphs piped through standard input stream +#### Glyphs piped through standard input stream You can also pipe text data to `uni` through the standard input stream. `uni` will process every glyph that it receives in the stdin stream and print the associated Unicode code point to standard output. +``` +$ [application command] | uni +``` + #### Example ``` @@ -106,13 +125,51 @@ U+221A '√' U+30CA 'ナ' ``` +### Search for Glyphs with Unicode Code Points + +Unicode code point searches are performed with the hexadecimal value. Remove all prefix data from the string before you pass the request to uni. Include spaces between the Unicode code point arguments. + +**Acceptable Format**: `0041` + +**Unacceptable Format**: `U+0041` `u+0041` `\u0041` + +#### Unicode code points as arguments to `uni` + +``` +$ uni [Unicode code point 1]...[Unicode code point n] +``` + +``` +$ uni -g 0041 0031 03B2 2580 30CA +U+0041 'A' +U+0031 '1' +U+03B2 'β' +U+2580 '▀' +U+30CA 'ナ' +``` + +#### Unicode code points piped through standard input stream + +``` +$ [application command] | uni -g +``` + +``` +$ echo -n "0041 0031 03B2 2580 30CA" | uni +U+0041 'A' +U+0031 '1' +U+03B2 'β' +U+2580 '▀' +U+30CA 'ナ' +``` + ## Issues Please [file an issue report](https://github.com/source-foundry/uni/issues/new) on the repository for any problems that arise with use. ## Contributing -Contributions to the project are encouraged and welcomed. +Contributions to the project are encouraged and welcomed. Please base your work on the `dev` branch and submit pull requests with source changes. ## License