mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-19 21:33:41 -05:00
remove unused code
This commit is contained in:
parent
8f9459c0a4
commit
cac5ba5661
1 changed files with 0 additions and 36 deletions
36
functions.py
36
functions.py
|
@ -320,42 +320,6 @@ def listEmojis():
|
||||||
|
|
||||||
return emojis
|
return emojis
|
||||||
|
|
||||||
"""
|
|
||||||
def listEmojiPacks():
|
|
||||||
emoji_packs = []
|
|
||||||
emoji_base_path = Path.cwd() / 'static' / 'emojis'
|
|
||||||
|
|
||||||
for pack_dir in emoji_base_path.iterdir():
|
|
||||||
if pack_dir.is_dir():
|
|
||||||
relative_path = os.path.relpath(pack_dir, emoji_base_path)
|
|
||||||
json_file_path = const.emojiPath / f"{pack_dir.name}.json"
|
|
||||||
if json_file_path.exists():
|
|
||||||
pack_data = loadJSON(json_file_path)
|
|
||||||
pack_info = {
|
|
||||||
'name': pack_data['name'],
|
|
||||||
'exportedAt': pack_data['exportedAt'],
|
|
||||||
# 'website': pack_data['website'],
|
|
||||||
'emojis': pack_data['emojis']
|
|
||||||
}
|
|
||||||
print(f"pack info: {pack_info}")
|
|
||||||
print(f"pack name: {pack_info['name']}")
|
|
||||||
return pack_info
|
|
||||||
else:
|
|
||||||
preview_image = None
|
|
||||||
for file in pack_dir.iterdir():
|
|
||||||
if file.suffix in {'.png', '.jpg', '.jpeg', '.webp'}:
|
|
||||||
preview_image = os.path.join('static/emojis', relative_path, file.name)
|
|
||||||
break
|
|
||||||
|
|
||||||
emoji_packs.append({
|
|
||||||
'name': pack_dir.name,
|
|
||||||
'preview_image': preview_image,
|
|
||||||
'relative_path': f'static/emojis/{relative_path}'
|
|
||||||
})
|
|
||||||
|
|
||||||
return emoji_packs
|
|
||||||
"""
|
|
||||||
|
|
||||||
def listEmojiPacks():
|
def listEmojiPacks():
|
||||||
emoji_packs = []
|
emoji_packs = []
|
||||||
emoji_base_path = const.emojiPath
|
emoji_base_path = const.emojiPath
|
||||||
|
|
Loading…
Add table
Reference in a new issue