From 8560fe5caed460077cb15b5aecea8f364a3b4ddd Mon Sep 17 00:00:00 2001 From: jade Date: Mon, 13 Jul 2026 16:28:59 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=AA=A8=EC=A7=80=20py=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- remove_emojis.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 remove_emojis.py diff --git a/remove_emojis.py b/remove_emojis.py deleted file mode 100644 index 82c990e..0000000 --- a/remove_emojis.py +++ /dev/null @@ -1,34 +0,0 @@ -import os -import re - -pattern = re.compile(r'[\u2600-\u27BF\U0001F000-\U0001F9FF]+') - -root_dir = "." -target_exts = {'.java', '.html', '.md', '.yml', '.properties', '.xml', '.json', '.js', '.css'} - -count = 0 -for subdir, dirs, files in os.walk(root_dir): - if '.git' in dirs: dirs.remove('.git') - if 'build' in dirs: dirs.remove('build') - if '.gradle' in dirs: dirs.remove('.gradle') - - for file in files: - ext = os.path.splitext(file)[1].lower() - if ext in target_exts: - filepath = os.path.join(subdir, file) - try: - with open(filepath, 'r', encoding='utf-8') as f: - content = f.read() - - new_content = pattern.sub('', content) - new_content = new_content.replace('\uFE0F', '').replace('\u200D', '') - - if new_content != content: - with open(filepath, 'w', encoding='utf-8') as f: - f.write(new_content) - print(f"Cleaned: {filepath}") - count += 1 - except Exception as e: - pass - -print(f"\nTotal files cleaned: {count}")