[![PyPI][pypi badge]][pypi link]
[![Build Status][build badge]][build link]
[![Quality Gate][sonarcloud badge]][sonarcloud link]
# mmemoji
Custom Emoji manager command-line for [Mattermost][mattermost] 😎
Features:
* Create custom Emojis
* Delete custom Emojis
* List custom Emojis
* Search custom Emojis
* Export custom Emojis
## Installation
```shell
pip install mmemoji
mmemoji --help
```
_(Requires Python >=3.8)_
## Usage example
Let's take the [Party Parrot][COTPP] Emojis as an example.
* First, clone the Git repository or retrieve an archive of it:
```shell
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:
```shell
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:
```shell
mmemoji create --no-clobber {parrots,guests}/hd/*.gif {parrots,guests}/*.gif
```
> **Note**
>
> * Here we rely on [shell globbing][glob] 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:
```shell
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 [Poetry][poetry]:
```shell
poetry install
```
* You'll find a script to create a local [Docker][docker] test instance under `tests/`:
```shell
./tests/scripts/setup-mattermost.sh
```
* You can run the test suite with:
```shell
pytest
```
* And last thing, you can install the [pre-commit][pre-commit] hooks to help with the formatting of your code.
```shell
pre-commit install
```
[pypi badge]: https://img.shields.io/pypi/v/mmemoji.svg
[pypi link]: https://pypi.python.org/pypi/mmemoji
[build badge]: https://github.com/maxbrunet/mmemoji/actions/workflows/build.yml/badge.svg
[build link]: https://github.com/maxbrunet/mmemoji/actions/workflows/build.yml
[sonarcloud badge]: https://sonarcloud.io/api/project_badges/measure?project=maxbrunet_mmemoji&metric=alert_status
[sonarcloud link]: https://sonarcloud.io/dashboard?id=maxbrunet_mmemoji
[mattermost]: https://github.com/mattermost/mattermost-server
[COTPP]: https://cultofthepartyparrot.com
[glob]: https://en.wikipedia.org/wiki/Glob_(programming)
[poetry]: https://python-poetry.org/docs/
[docker]: https://www.docker.com
[pre-commit]: https://pre-commit.com
Raw data
{
"_id": null,
"home_page": "https://github.com/maxbrunet/mmemoji.git",
"name": "mmemoji",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "cli,emoji,mattermost",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/9a/e5/c1537b8f880576fe6995655cb18960223c357d7e41cec23b5f5b2d31a2da/mmemoji-0.5.0.tar.gz",
"platform": null,
"description": "[![PyPI][pypi badge]][pypi link]\n[![Build Status][build badge]][build link]\n[![Quality Gate][sonarcloud badge]][sonarcloud link]\n\n# mmemoji\n\nCustom Emoji manager command-line for [Mattermost][mattermost] \ud83d\ude0e\n\nFeatures:\n\n* Create custom Emojis\n* Delete custom Emojis\n* List custom Emojis\n* Search custom Emojis\n* Export custom Emojis\n\n## Installation\n\n\n```shell\npip install mmemoji\nmmemoji --help\n```\n\n_(Requires Python >=3.8)_\n\n## Usage example\n\nLet's take the [Party Parrot][COTPP] Emojis as an example.\n\n* First, clone the Git repository or retrieve an archive of it:\n\n```shell\ngit clone https://github.com/jmhobbs/cultofthepartyparrot.com.git\ncd cultofthepartyparrot.com\n```\n\n* 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:\n\n```shell\nexport MM_URL='http://127.0.0.1:8065/api/v4'\nexport MM_LOGIN_ID='user-1@sample.mattermost.com'\nexport MM_PASSWORD='user-1'\n```\n\n* Finally, run `mmemoji` to import all the parrots:\n\n```shell\nmmemoji create --no-clobber {parrots,guests}/hd/*.gif {parrots,guests}/*.gif\n```\n\n> **Note**\n>\n> * Here we rely on [shell globbing][glob] to select all emojis from the directories.\n> * Specifying the `hd` directories first with `--no-clobber` ensures these emojis are created first and not overwritten by their lower quality counterpart.\n\n* If you ever want to remove them all, simply run the following:\n\n```shell\nmmemoji delete --force {parrots,guests}/hd/*.gif {parrots,guests}/*.gif\n```\n\n> **Note**\n>\n> * The emoji names are extracted from the filenames the same way they have been during creation.\n> * `--force` is used to ignore the absent low quality duplicates.\n\n## Development\n\n* You can clone this repository and install the project with [Poetry][poetry]:\n\n```shell\npoetry install\n```\n\n* You'll find a script to create a local [Docker][docker] test instance under `tests/`:\n\n```shell\n./tests/scripts/setup-mattermost.sh\n```\n\n* You can run the test suite with:\n\n```shell\npytest\n```\n\n* And last thing, you can install the [pre-commit][pre-commit] hooks to help with the formatting of your code.\n\n```shell\npre-commit install\n```\n\n[pypi badge]: https://img.shields.io/pypi/v/mmemoji.svg\n[pypi link]: https://pypi.python.org/pypi/mmemoji\n[build badge]: https://github.com/maxbrunet/mmemoji/actions/workflows/build.yml/badge.svg\n[build link]: https://github.com/maxbrunet/mmemoji/actions/workflows/build.yml\n[sonarcloud badge]: https://sonarcloud.io/api/project_badges/measure?project=maxbrunet_mmemoji&metric=alert_status\n[sonarcloud link]: https://sonarcloud.io/dashboard?id=maxbrunet_mmemoji\n[mattermost]: https://github.com/mattermost/mattermost-server\n[COTPP]: https://cultofthepartyparrot.com\n[glob]: https://en.wikipedia.org/wiki/Glob_(programming)\n[poetry]: https://python-poetry.org/docs/\n[docker]: https://www.docker.com\n[pre-commit]: https://pre-commit.com\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "Custom Emoji manager command-line for Mattermost \ud83d\ude0e",
"version": "0.5.0",
"project_urls": {
"Homepage": "https://github.com/maxbrunet/mmemoji.git",
"Repository": "https://github.com/maxbrunet/mmemoji.git"
},
"split_keywords": [
"cli",
"emoji",
"mattermost"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ea5c622a5333e9f5513f0e119816d799dddf94fad6c9abea9fd6ea9a4b767ded",
"md5": "2a342e80db67f252628b340573812859",
"sha256": "42b9a759cf81f39741a0b2bc05236e6d035c6abbf89c3552cb59e1863c02e061"
},
"downloads": -1,
"filename": "mmemoji-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2a342e80db67f252628b340573812859",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 24865,
"upload_time": "2023-07-02T19:36:16",
"upload_time_iso_8601": "2023-07-02T19:36:16.192992Z",
"url": "https://files.pythonhosted.org/packages/ea/5c/622a5333e9f5513f0e119816d799dddf94fad6c9abea9fd6ea9a4b767ded/mmemoji-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9ae5c1537b8f880576fe6995655cb18960223c357d7e41cec23b5f5b2d31a2da",
"md5": "b7deb98474626f80f64c06cdb8acec38",
"sha256": "2fbd4817c146dfbd6b89542b488b7848905ecb2e4b6d5086f87b95281373fce4"
},
"downloads": -1,
"filename": "mmemoji-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "b7deb98474626f80f64c06cdb8acec38",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 22505,
"upload_time": "2023-07-02T19:36:17",
"upload_time_iso_8601": "2023-07-02T19:36:17.508658Z",
"url": "https://files.pythonhosted.org/packages/9a/e5/c1537b8f880576fe6995655cb18960223c357d7e41cec23b5f5b2d31a2da/mmemoji-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-02 19:36:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "maxbrunet",
"github_project": "mmemoji",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mmemoji"
}