This project was created when I use django-markdownx for rendering my markdown on my django website. But at the difference of another projet: Martor, django-markdownx doesn't contain any emoji implementation for a social part.
Thanks to the developer of Martor who inspire this projet and Markdown team for his great documentation about the extension.
The goal of this project is offered a list of defects images and you just select which kind of images you want to use on your website.
- Python >= 3.6.0
- Markdown >= 2.5
NB: fstring was used to formated string, so python 3.6.0 minimum.
- Hexadecimal code
- Decimal code
- Github (name based)
- Github (unicode based)
- Webpagefx
- Samsung
- Messenger
- EmojiOne
- Miscrosoft
- Apple
- Mozilla
- LG
- Emojidex
For the moment the projet is only available on GitHub.
git clone https://github.com/TheBuky/markdown-crazy-emojis.git
cd markdown-crazy-emojis
Run python in the project folder and try this commandes lines to test the CrazyEmojis render (note: I suppose markdwon is already installed).
>>> import markdown
>>> from crazy_emojis import CrazyEmojis
>>> src = "This extension is amazing :open_mouth:"
>>> html = markdown.markdown(src, extensions=[CrazyEmojis()])
>>> print(html)
<p><img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/open_mouth.png" /></p>
As default, when kind_emojis
is empty is value is set for github
emojis render.
But if you want to have an other emoji output, set the markdown extension setting for the kind of emojis you want: kind_emojis='webpagefx'
>>> import markdown
>>> from crazy_emojis import CrazyEmojis
>>> src = "This extension is amazing :open_mouth:"
>>> html = markdown.markdown(src, extensions=[CrazyEmojis(kind_emojis='webpagefx')])
>>> print(html)
<p><img class="emoji" alt="open_mouth" src="https://www.webpagefx.com/tools/emoji-cheat-sheet/graphics/emojis/open_mouth.png" /></p>
List of kind emojis available now:
github
webpagefx
coming soon