From 74fd0ba646f20d209b2bfca5adea94313a2de2cf Mon Sep 17 00:00:00 2001 From: mst Date: Tue, 26 Nov 2024 15:14:57 +0300 Subject: [PATCH] remove debug prints and unused code --- app.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/app.py b/app.py index bbe78d2..ef4e1c5 100644 --- a/app.py +++ b/app.py @@ -256,9 +256,7 @@ def emojis(): packs = func.listEmojiPacks() if packs: for pack in packs: - # print(pack,'\n') json_pack = bool(pack.get('website') and pack.get('exportedAt')) - print(json_pack) if json_pack: break else: @@ -540,28 +538,7 @@ def uploadEmojiPack(): meta_json_path = extract_path / 'meta.json' if meta_json_path.exists(): processed_emojis = func.processEmojis(meta_json_path) - # emoji_metadata = func.loadJSON(meta_json_path) - # emojis = emoji_metadata.get('emojis', []) - - # processed_emojis = [] - # for emoji in emojis: - # emoji_info = { - # 'name': emoji['emoji']['name'], - # 'file_name': emoji['fileName'] - # } - # processed_emojis.append(emoji_info) - # app.logger.debug(f"[CatAsk/API/upload_emoji_pack] Processed emoji: {emoji_info['name']} (File: {emoji_info['file_name']})") - - # pack_json = { - # 'name': emoji_metadata['emojis'][0]['emoji']['category'].capitalize(), - # 'exportedAt': emoji_metadata["exportedAt"], - # 'emojis': processed_emojis - # } - # pack_json_name = const.emojiPath / (emoji_metadata['emojis'][0]['emoji']['category'] + '.json') - # func.saveJSON(pack_json, pack_json_name) - return jsonify({'message': f'Successfully uploaded and processed {len(processed_emojis)} emojis from archive "{filename}".'}), 201 - else: return jsonify({'message': f'Archive {filename} successfully uploaded and extracted.'}), 201 @@ -605,9 +582,7 @@ def deleteEmoji(): emoji_name = request.args.get('emoji_name') emoji_base_path = const.emojiPath emoji_file_path = emoji_base_path / emoji_name - print(emoji_file_path) emoji_ext = os.path.splitext(f"{emoji_base_path}/{emoji_file_path}") - print("emoji ext:", emoji_ext) if not emoji_file_path.exists() or not emoji_file_path.is_file(): return jsonify({'error': 'Emoji not found'}), 404 @@ -729,7 +704,6 @@ def viewAnswer(): cursor.close() conn.close() return jsonify(answer) -""" @api_bp.route('/update_config/', methods=['POST']) @loginRequired