diff --git a/batch.py b/batch.py index ff819c9..0f2d356 100644 --- a/batch.py +++ b/batch.py @@ -130,10 +130,14 @@ def extract_zip(zip_path: str, dest_dir: str) -> list[str]: info.filename = fixed except (UnicodeDecodeError, UnicodeEncodeError): pass # keep original if re-decode fails + # Skip macOS resource fork files and __MACOSX directory + basename = Path(info.filename).name + if basename.startswith('._') or '__MACOSX' in info.filename: + continue z.extract(info, dest_dir) files = [] for f in Path(dest_dir).rglob('*.xlsx'): - if not f.name.startswith('~$'): + if not f.name.startswith('~$') and not f.name.startswith('._'): files.append(str(f)) return sorted(files) diff --git a/static/batch3.html b/static/batch3.html index da6d1b1..af61de8 100644 --- a/static/batch3.html +++ b/static/batch3.html @@ -92,8 +92,19 @@ pre { background: #2c2c2c; color: #f5f0eb; padding: .8rem; border-radius: 6px; o