Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.2 KB

README.md

File metadata and controls

46 lines (32 loc) · 1.2 KB

nimoji

🍕🍺 emoji support for Nim 👑 and the world 🌍.

Inspired by kyokomi and carpedm20. Emojis codemap is from muan.

Go to Emoji searcher for a searchable list of supported emojis.

Usage

From command line:

nimoji - 🍕🍺 emoji support for Nim 👑 and the world 🌍.
Usage: nimoji ARGUMENT

If ARGUMENT is an existing file, it will use as input the file,
otherwise it will use ARGUMENT as input.
Output is input with keywords delimited by ':' rendered as emoji.

Example usage:
  nimoji :wave:
    👋
  nimoji "hello :earth_africa:"
    hello 🌍
  nimoji hello.nim
    let 👋 = "hello"

    echo 👋 & " 🌍"

For a searchable list of supported emoji keywords: https://emoji.muan.co/

From Nim:

import nimoji

assert "I :heart: :pizza: and :beer:".emojize == "I ❤️ 🍕 and 🍺"
assert "The emoji for spaghetti: :spaghetti:".emojize, "The emoji for spaghetti: 🍝"

# substitution is style insensitive
assert "you say :to_ma_to: I say :ToMaTo:".emojize == "you say 🍅 I say 🍅"