Emoji support for Nim Gets emoji data from here, and saves the json to your home directory. Concept and design based on node-emoji with a few of my own ideas thrown in too.
(Not in Nimble package manager yet, as theres another package with the same name, and also I havent worked out how to do nimble things yet, still fairly new at Nim. To use, just download the .nim file and drop it in to the project directory.)
import nimoji
echo getEmoji "santa"
# π
echo getEmojiCode "π
"
# santa
echo findEmoji "sant"
# π
echo findEmojis "sa"
# @["β", "πΈπ¦", "ποΈ", "πΆ", "π
", "π", "π·", "π½", "π‘", "πββοΈ", "πββοΈ", "πββοΈ", "π‘", "π", "π", "π₯", "π°οΈ", "πΈ", "π₯", "π₯", "π₯ͺ", "π¦", "β³", "β΅"]
echo findEmojiCodes "sa"
# @["sagittarius", "flag-sa", "sa", "sake", "santa", "school_satchel", "saxophone", "running_shirt_with_sash", "sandal", "woman-getting-massage", "massage", "man-getting-massage", "satellite_antenna", "satisfied", "disappointed", "disappointed_relieved", "satellite", "flying_saucer", "croissant", "green_salad", "sandwich", "sauropod", "hourglass_flowing_sand", "sailboat"]
echo emojify "I love :santa:!"
# I love π
!
echo demojify "I love π
"
# I love :santa:
echo stripEmojis "I love π
" ##also supports stripping discord supported emojis from text.
# I love
echo randomEmoji()
# βοΈ