Skip to content

emoji-gen/emojilib

Repository files navigation

emojilib

PyPI version Build Status wercker status Requirements Status

📚 Ultimate Emoji Generator library for Python

System requirements

  • Python 3.6, 3.7 or 3.8
  • C11 Compiler

Official supported platforms

We officially support building and running on these platforms below, but you can try it on other platforms.

  • macOS 10.14 Mojave
  • macOS 10.15 Catalina
  • Debian 10 Buster

Used libraries

Getting started

$ pip install emojilib --extra-index-url https://repo.fury.io/emoji-gen/

Example

import emojilib

def main():
    data = emojilib.generate(text="ab\nc.", width=128, height=128)

    with open('emoji.png', 'wb') as f:
        f.write(data)

if __name__ == '__main__':
    main()

How to build

1. Compile libemoji

First, please build externals. See also libemoji's README.

$ git submodule update --init --recursive
$ cd externals/libemoji
$ cmake .
$ make

2. Setup Python virtualenv

$ python -m venv venv
$ . venv/bin/activate

3. Run build command

$ python setup.py build

Development

Dependencies

$ pip install -r requirements-dev.txt

Example

$ python setup.py install
$ python ./example/example.py

Test

$ python setup.py build install test

Create wheel package

$ pip install wheel --upgrade
$ python setup.py bdist_wheel

See also

License

MIT © Emoji Generator