Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/syumai/emo

a CLI tool to find emojis with fuzzy-find window.
https://github.com/syumai/emo

emoji go golang

Last synced: 2 months ago
JSON representation

a CLI tool to find emojis with fuzzy-find window.

Awesome Lists containing this project

README

        

# emo

[![Go Reference](https://pkg.go.dev/badge/github.com/syumai/emo.svg)](https://pkg.go.dev/github.com/syumai/emo)

- emo is a CLI tool to find emojis with fuzzy-find window.
- This tool is using data of https://github.com/iamcal/emoji-data

![](https://user-images.githubusercontent.com/6882878/167252025-8208ccfc-d374-4948-9301-57ba67a6115a.png)

## Installation

- This tool requires Go 1.18+ for installation.

```
go install github.com/syumai/emo/cmd/emo@latest
```

## Usage

### Simple find

```
$ emo exclamation

```

### Fuzzy find

```
# Open fuzzy find window
$ emo
> exclamation
3/1643
> excla # Enter to get emoji

```

### Random select

```
$ emo -rand
😁
```

### Fuzzy find / Random select by subcategory

```
$ emo -listsub
alphanum
animal-amphibian
animal-bird
...
warning
writing
zodiac

$ emo -findsub
> warning_
16/1817
> warning_no_bicycles # Enter to get emoji
🚳

$ emo -randsub animal-bird
🦜
```

### Copying emoji

- To copy emoji to your clipboard, please use commands like pbcopy (on Mac) or xsel (on Linux).

```
# Copy emoji of star to clipboard.
$ emo star | pbcopy (or `xsel -ib` on Linux)
```

## Using as library

### Installation

```console
go get github.com/syumai/emo
```

### Usage

```go
// EmojiData is a list of emoji
emoji := emo.EmojiData[0]

// print data of emoji
// { Name, Unified, NonQualified, Docomo, Au, Softbank, Google...
fmt.Println(emoji)

// get specified emoji by short name
starEmoji := emo.Get("star")

// print emoji as string: ⭐
fmt.Println(starEmoji.String())
```

## License

- MIT

## Author

- this package: [syumai](https://github.com/syumai)
- emoji-data: [iamcal](https://github.com/iamcal)