1
0
mirror of https://github.com/ciromattia/kcc synced 2026-05-26 17:32:15 +00:00

dot_clean in c2p

This commit is contained in:
Alex Xu
2025-08-01 18:06:24 -07:00
parent a7005748c7
commit 9a605c2d8a
3 changed files with 12 additions and 9 deletions

View File

@@ -45,6 +45,14 @@ class HTMLStripper(HTMLParser):
pass
def dot_clean(filetree):
for root, _, files in os.walk(filetree, topdown=False):
for name in files:
if name.startswith('._') or name == '.DS_Store':
if os.path.exists(os.path.join(root, name)):
os.remove(os.path.join(root, name))
def getImageFileName(imgfile):
name, ext = os.path.splitext(imgfile)
ext = ext.lower()