Skip to main content

Custom Emoji manager command-line for Mattermost 😎

Project description

PyPI Build Status Quality Gate

mmemoji

Custom Emoji manager command-line for Mattermost 😎

Features:

  • Create custom Emojis
  • Delete custom Emojis
  • List custom Emojis
  • Search custom Emojis
  • Export custom Emojis

Installation

pip install mmemoji
mmemoji --help

(Requires Python >=3.9)

Usage example

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 mmemoji with the arguments --url/--login-id/--password or via environment variables, for example:
export MM_URL='http://127.0.0.1:8065/api/v4'
export MM_LOGIN_ID='user-1@sample.mattermost.com'
export MM_PASSWORD='user-1'
  • Finally, run mmemoji to import all the parrots:
mmemoji create --no-clobber {parrots,guests}/hd/*.gif {parrots,guests}/*.gif

Note

  • Here we rely on shell globbing to select all emojis from the directories.
  • Specifying the hd directories first with --no-clobber ensures 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}/*.gif

Note

  • The emoji names are extracted from the filenames the same way they have been during creation.
  • --force is used to ignore the absent low quality duplicates.

Development

  • 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.sh
  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mmemoji-0.6.0.tar.gz (71.0 kB view details)

Uploaded Source

Built Distribution

mmemoji-0.6.0-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file mmemoji-0.6.0.tar.gz.

File metadata

  • Download URL: mmemoji-0.6.0.tar.gz
  • Upload date:
  • Size: 71.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.1

File hashes

Hashes for mmemoji-0.6.0.tar.gz
Algorithm Hash digest
SHA256 767db07a08f44dc3aae4989d1046a820d89fc49be643402879bf813ca3af4e8f
MD5 8e028cb323381763073f6938d08bf91f
BLAKE2b-256 07bd26a107eb89de7b272f04b486b35564582a909d2c02c50c6e6e10ff8b23a0

See more details on using hashes here.

File details

Details for the file mmemoji-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: mmemoji-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.1

File hashes

Hashes for mmemoji-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c349418c9b992026aee6a25ac13e7d9f1bad4810aaaea05daf03fea5db67448
MD5 fb38adcb01961d05710fcfb735730f79
BLAKE2b-256 22d89cb2b3733f755ab76f445cd0e0b4ffad4ed9938f2f3de143036d715d68c5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page