Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrieankhisbe/emojizer
Less is more with emojies 😉
https://github.com/adrieankhisbe/emojizer
cli command-line emoji gemoji hacktoberfest less pager shell
Last synced: 2 months ago
JSON representation
Less is more with emojies 😉
- Host: GitHub
- URL: https://github.com/adrieankhisbe/emojizer
- Owner: AdrieanKhisbe
- License: mit
- Created: 2020-09-25T19:50:48.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-12T21:08:44.000Z (5 months ago)
- Last Synced: 2024-09-17T20:19:22.432Z (3 months ago)
- Topics: cli, command-line, emoji, gemoji, hacktoberfest, less, pager, shell
- Language: JavaScript
- Homepage:
- Size: 567 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# emojizer
[![Npm version](https://img.shields.io/npm/v/emojizer.svg)](https://www.npmjs.com/package/emojizer)
[![Build Status](https://travis-ci.com/AdrieanKhisbe/emojizer.svg?branch=master)](https://travis-ci.com/AdrieanKhisbe/emojizer)
[![codecov](https://codecov.io/gh/AdrieanKhisbe/emojizer/branch/master/graph/badge.svg)](https://codecov.io/gh/AdrieanKhisbe/emojizer)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)> Turn your :emoji_codes: into thier emoji character :wink:
## About
**`emojizer`** is a program filter that turn github emoji codes into associated character.Wanna try before install? just `npx emojizer "Try me :wave:"`,
and if you want to install an standard global install will do it: `npm install -g emojizer`### CLI
As a pipe, just place it between your program, and your eventual pager.
You can use either `emojizer` or its alias `emojize`.```bash
echo "Something with emojies :upside_down_face:" | emojizer
# 📺 Something with emojies 🙃echo "Insert before your pager :pager:" | emojizer | less
```You can also provide input as argument, either as text, either as file using the `-f`/`--file` flag
```bash
emojizer "Some string" "with or without" "emojies :slightly_smiling_face:"
# 📺 Some string
# with or without
# emojies 🙂
emojizer -f README.md CHANGELOG.md
# 📺 ...README then CHANGELOG with emoji code replaces
```Using zsh, you can for instance define a global alias that combine `emojizer` and `less` or any other pager you use.
```bash
alias -g eless="emojizer|less"
# then just
git log --oneline --color | eless
```Note that used with `git log` you might have to force color output, with `--color` flag for instance.
#### Detailed help
Just provide the `-h` or `--help` flag and you'll have the help displayed:```
Replace your emoji codes with "real" emojies 😉Usage:
cat something | emojizer
emojizer "text with :slightly_smiling_face:" ":wink:"
emojizer -f README.mdOptions:
--version Show version number [boolean]
-f, --file Treat args as file to read from [boolean] [default: false]
-h, --help Show help [boolean]
```### API
Internal replacing logic is exposed and so functionality can be reuse.Provided API is so far limited, but it expose:
- a function to replace emoji code with corresponding emoji caracter: `replaceEmojiCodes`
- a function to create a `Transform` stream: `getEmojizerStream`
- the `emojiIndex` used internaly and provided by the **[`gemoji`](https://github.com/wooorm/gemoji)** library (`emoji/name-to-emoji.json`)```js
const {replaceEmojiCodes} = require('emojizer');console.log(replaceEmojiCodes('some text with :symbols:'));
// for getEmojizerStream, see the source or the tests 📃
```## Miscaleanous
Original release was made under the name `emojiless` with catchphrase
> Less is more with emojies :wink:Named was changed as `less` was misleading, program not being a pager.