Added support for gifs
This commit is contained in:
parent
b060d85365
commit
5eec570a72
1 changed files with 3 additions and 2 deletions
|
@ -5,18 +5,19 @@ ASSETS_URL="https://raw.githubusercontent.com/RealOrangeOne/hipchat-emoticons-fo
|
|||
|
||||
|
||||
def get_icon_name(path):
|
||||
return get_filename(path).replace('.png', '')
|
||||
return get_filename(path).replace('.png', '').replace('.gif', '')
|
||||
|
||||
def get_filename(path):
|
||||
return path.replace('assets/', '')
|
||||
|
||||
|
||||
files = glob('assets/*.png')
|
||||
files = glob('assets/*.png', 'assets/*.gif')
|
||||
images = []
|
||||
|
||||
for filename in files:
|
||||
images.append({get_icon_name(filename): ASSETS_URL + get_filename(filename)})
|
||||
|
||||
|
||||
image_decoder = {"images":images}
|
||||
|
||||
image_decoder_json = json.dumps(image_decoder, indent=2, sort_keys=True)
|
||||
|
|
Reference in a new issue