-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Custom the emojis
agus makmun edited this page Mar 8, 2019
·
2 revisions
If you want to save the emoji icons to your local storage, you can use with this;
try:
# python2
from urllib import urlretrieve
except ImportError:
# python3
from urllib.request import urlretrieve
from martor.extensions.emoji import EMOJIS
emoji_path = 'emojis/' # create this folder first
base_url = 'https://github.githubassets.com/images/icons/emoji/'
for emoji in EMOJIS:
emoji_image = emoji.replace(':', '') + '.png'
urlretrieve(base_url + emoji_image, emoji_path + emoji_image)
print("Downloaded: {}".format(emoji_image))
The emojis are not complete yet, because the religion reason. But, you can custom that emojis by changing these files:
martor/extensions/emoji.py
martor/static/plugins/js/emojis.min.js