This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@duhdugg/emocli

0.7.1 • Public • Published

emocli

emocli provides a command-line interface for searching emoji characters.

It uses combined data from Mange/emoji-data and carloscuesta/gitmoji.

Install

npm install -g @duhdugg/emocli

or

yarn global install @duhdugg/emocli

Usage

Usage:	emocli [OPTIONS] <search>

OPTIONS:
-h | --help 	print this help
-l | --list 	list all emoji characters
-i | --info 	include info
-n | --name 	match name exactly

Examples

list all emoji characters with their name, info, and gitmoji description (if available)

emocli -li

search for an emoji using keywords

emocli -i dog
# output
🐶 dog face | Animals & Nature / animal-mammal | dog,face,pet
🐕 dog | Animals & Nature / animal-mammal | dog,pet
🦮 guide dog | Animals & Nature / animal-mammal | accessibility,blind,guide,guide dog
🐕‍🦺 service dog | Animals & Nature / animal-mammal | accessibility,assistance,dog,service
🐩 poodle | Animals & Nature / animal-mammal | dog,poodle
🌭 hot dog | Food & Drink / food-prepared | frankfurter,hot dog,hotdog,sausage

print a specific emoji by name

if the name is more than one word, it should be enclosed in quotes

emocli -n 'guide dog'
# output
🦮

use in a commit message

git commit -m "$(emocli -n rocket) production launch"

use with rofi and xclip

rofi is a window switcher, application launcher, and dmenu replacement. Here, it is being used as a dmenu replacement to provide a graphical interface for search and select.

xclip is a command line utility that provides an interface to the X11 clipboard. Here, it is being used to copy its standard input into the clipboard.

# put this somewhere as a script in your PATH, shell alias, or keyboard shortcut
emocli -li | rofi -dmenu -window-title emoji | cut -d' ' -f1 | tr -d '\n' | xclip -selection clipboard

Troubleshooting

my terminal is not displaying all emoji characters

Your mileage may vary on terminal support for displaying emoji consisting of 2 or more characters joined by a zero-width joiner character (U+200D). The "service dog" emoji (🐕‍🦺) is one such example. Even with a proper font config, it will appear on many terminals as a dog next to a safety vest (🐕🦺).

Currently, the best configuration tested with emocli -li is the kitty terminal with the Noto Color Emoji font installed and configured in your fontconfig.

License

Copyright (c) 2021 Doug Elkin

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Readme

Keywords

none

Package Sidebar

Install

npm i @duhdugg/emocli

Weekly Downloads

0

Version

0.7.1

License

MIT

Unpacked Size

94 kB

Total Files

12

Last publish

Collaborators

  • dougelkin