Custom Emoji manager command-line for Mattermost 😎
Features:
- Create custom Emojis
- Delete custom Emojis
- List custom Emojis
- Search custom Emojis
- Export custom Emojis
pip install mmemoji
mmemoji --help(Requires Python >=3.10)
Let's take the Party Parrot Emojis as an example.
- First, clone the Git repository or retrieve an archive of it:
git clone https://github.com/jmhobbs/cultofthepartyparrot.com.git
cd cultofthepartyparrot.com- Then you'll need your Mattermost credentials. You can either pass them to
mmemojiwith the arguments--url/--login-id/--passwordor via environment variables, for example:
export MM_URL='http://127.0.0.1:8065'
export MM_LOGIN_ID='[email protected]'
export MM_PASSWORD='user-1'- Finally, run
mmemojito import all the parrots:
mmemoji create --no-clobber {parrots,guests}/hd/*.gif {parrots,guests}/*.gifNote
- Here we rely on shell globbing to select all emojis from the directories.
- Specifying the
hddirectories first with--no-clobberensures these emojis are created first and not overwritten by their lower quality counterpart.
- If you ever want to remove them all, simply run the following:
mmemoji delete --force {parrots,guests}/hd/*.gif {parrots,guests}/*.gifNote
- The emoji names are extracted from the filenames the same way they have been during creation.
--forceis used to ignore the absent low quality duplicates.
- You can clone this repository and install the project with uv:
uv sync- You'll find a script to create a local Docker test instance under
tests/:
./tests/scripts/setup-mattermost.py- You can run the test suite with:
pytest- And last thing, you can install the pre-commit hooks to help with the formatting of your code.
pre-commit install