Render emojis on your scripts outputs 🙂
# install module
Install-Module -Name PSEmoji -Repository PSGallery
# import module
Import-Module -Name PSEmoji
After you install and import PSEmoji module, this will export a new variable $PSEMOJI.
The $PSEMOJI variable is an object instance of a custom class psemoji and this is what you'll use for accessing your emojis. The emojis will be stored on nested properties of property emojis.
# Syntax example: $PSEMOJI.emojis.[emoji-category].[emoji-name]
$PSEMOJI.emojis.face.happy
There are 4 functions for manipulating $PSEMOJI:
# Create new emoji category
New-PSEmojiCategory -Name <string>
# Adds new emojis
Add-PSEmoji -EmojiCategory <string> -EmojiName <string> -EmojiUnicode <string>
# Removes existent emojis
Remove-PSEmoji -EmojiCategory <string> -EmojiName <string>
# Removes existent emoji category
Remove-PSEmojiCategory -Name <string>
There'll be two functions available for importing/exporting your emojis so you can keep your created emojis with you anywhere!
# Export your emojis
Export-PSEmojiUnicodeJson -OutFilePath "[file system path of your choice]"
# Import your emojis
Import-PSEmojiUnicodeJson -Path "[path to your EmojiUnicode.json file]"
The $PSEMOJI object contains a method UnicodeCharts_Open() which will pop up your default browser and redirect you to a page with the emoji unicode chart so you can know which emoji unicode input to provide on Add-PSEmoji function.
$PSEMOJI.UnicodeCharts_Open()