https://github.com/tani/cl-emoji
cl-emoji provides the Unicode emoji characters.
https://github.com/tani/cl-emoji
Last synced: 2 months ago
JSON representation
cl-emoji provides the Unicode emoji characters.
- Host: GitHub
- URL: https://github.com/tani/cl-emoji
- Owner: tani
- License: mit
- Created: 2015-08-17T07:46:33.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-03-02T17:48:29.000Z (over 1 year ago)
- Last Synced: 2025-02-02T00:46:30.936Z (4 months ago)
- Language: Common Lisp
- Size: 271 KB
- Stars: 14
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# :smile: Cl-Emoji [](http://quickdocs.org/cl-emoji/)
cl-emoji provides the Unicode emoji characters:smile: :heart_eyes: :scream: :alien: :fire: :zzz: :hand:
cl-emoji is able to treat Emoji 5.0 defined in Unicode 10.0! (ex. UFO; https://emojipedia.org/flying-saucer/)
## :boom: Usage
```lisp
(ql:quickload :cl-emoji)
(emoji:codepoint '("U+1F600"))
=> "π"
(emoji:name "grinning face")
=> "π"
(emoji:annotation "face")
=> (("π" "U+1F600" "grinning face" ("face" "grin" "person")) ...);; We can also get emoji with slack-like string
(emoji:alpha-code ":grin:")
=> "π"
``````lisp
(format t "Hello~a!~%" (emoji:name "grinning face"))
=> Helloπ!
```
According to PR #3, we can use following APIs.If you tell emoji version to cl-emoji API, do like this (and I checked if path generated at API calling):
```lisp
CL-USRE> (trace format)
CL-USER> (cl-emoji:annotation "grin")
0: (FORMAT NIL "file ~A"
"/home/foo/cl-emoji/data/emoji_4.0_release-30.lisp")
0: FORMAT returned
"file /home/foo/cl-emoji/data/emoji_4.0_release-30.lisp"
(("π" ("U+1F600") "grinning face" ("face" "grin") "Smileys & People"
"face-positive")
...)
CL-USER> (let ((cl-emoji:*current-version* (second cl-emoji:+versions+)))
(cl-emoji:annotation "grin"))
0: (FORMAT NIL "file ~A"
"/home/foo/cl-emoji/data/emoji_5.0_release-31.lisp")
0: FORMAT returned
"file /home/foo/cl-emoji/data/emoji_5.0_release-31.lisp"
(("π" ("U+1F600") "grinning face" ("face" "grin") "Smileys & People"
"face-positive")
...)
```### :smile: Groups and Subgroups
Those are appears in [Full Emoji Data](http://www.unicode.org/emoji/charts-beta/full-emoji-list.html), for instance `Smileys & People` is a group and `face-positive` is a subgroup.
You can get emoji by group name and subgroup name with API `cl-emoji:group` and `cl-emoji:subgroup`.
see also [Full Emoji Data](http://unicode.org/emoji/charts/full-emoji-list.html)### :smile: Search
If you want to search available annotations/groups/subgroups, then.```
CL-USER> (emoji:group-apropos "foo")CL-USER> (emoji:subgroup-apropos "bar")
CL-USER> (emoji:annotation-apropos "bazz")
```
## :laughing: Author
* Fernado Garcia Borges ([email protected])
## :ok_hand: Copyright
* Fernado Garcia Borges ([email protected])
* src/cl-emoji.lisp is licensed under the MIT License
* data/emoji-list.lisp is licensed under the Unicoded License