Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fxfactorial/ocaml-emoji
Emojis in OCaml, use them in your CLIs or whatever
https://github.com/fxfactorial/ocaml-emoji
cli cute emoji ocaml
Last synced: 17 days ago
JSON representation
Emojis in OCaml, use them in your CLIs or whatever
- Host: GitHub
- URL: https://github.com/fxfactorial/ocaml-emoji
- Owner: fxfactorial
- Created: 2017-01-22T00:12:29.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-24T00:24:58.000Z (6 months ago)
- Last Synced: 2024-10-13T21:27:32.756Z (about 1 month ago)
- Topics: cli, cute, emoji, ocaml
- Language: OCaml
- Homepage: hyegar.com/ocaml-emoji
- Size: 945 KB
- Stars: 27
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
emojis
------Single OCaml file containing byte sequences for common `emojis`
sourced from [here](http://apps.timwhitlock.info/emoji/tables/unicode)```
$ opam install emoji
```You can see them by printing to the screen,
ie: `print_endline Emoji.man_facepalming`And using `ocp-browser` shows the emoji
![](./ocp-browser-emoji.png)
# Development
First of all pin the package:
```
$ opam pin add emoji /path/to/local/checkout/of/emoji
```To update the `lib/emoji.ml` this [code](./gencode/main.ml) is
used. Don't forget to run before (re-)installing!This simple sanity test lets you review your changes:
```ocaml
#require "emoji";;let () =
let ar = Emoji.all_emojis |> Array.of_list in
for i = 0 to Array.length ar - 1 do
if (i mod 80 = 0) then print_newline ();
print_string ar.(i);
done
```Which for me resulted in:
![](./emojis.png)