Skip to content

Pyvonix/markdown-crazy-emojis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


 markdown-crazy-emojis
markdown-crazy-emojis

Introduction

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.

Requierements.

  • Python >= 3.6.0
  • Markdown >= 2.5

NB: fstring was used to formated string, so python 3.6.0 minimum.

Emojis avaibles.

Installation

For the moment the projet is only available on GitHub.

git clone https://github.com/TheBuky/markdown-crazy-emojis.git
cd markdown-crazy-emojis

How it's work? Just try it

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

Implementation

coming soon

About

Emoji extension for Python-Markdown.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages