feat: поддержка .gge, .esw, .xml в пакетном обработчике
Файлы сметных программ (ГРАНД-Смета .gge/.esw) — это XML. Теперь extract_zip, batch_v2, batch_v3 находят и обрабатывают все сметные форматы: .xlsx, .xls, .gge, .esw, .xml GGE/ESW копируются как XML без xlsx-конвертации. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -135,9 +135,12 @@ def extract_zip(zip_path: str, dest_dir: str) -> list[str]:
|
||||
if basename.startswith('._') or '__MACOSX' in info.filename:
|
||||
continue
|
||||
z.extract(info, dest_dir)
|
||||
# Collect all supported smeta file types
|
||||
SMETA_EXTENSIONS = {'.xlsx', '.xls', '.gge', '.esw', '.xml'}
|
||||
files = []
|
||||
for f in Path(dest_dir).rglob('*.xlsx'):
|
||||
if not f.name.startswith('~$') and not f.name.startswith('._'):
|
||||
for f in Path(dest_dir).rglob('*'):
|
||||
if f.is_file() and f.suffix.lower() in SMETA_EXTENSIONS \
|
||||
and not f.name.startswith('~$') and not f.name.startswith('._'):
|
||||
files.append(str(f))
|
||||
return sorted(files)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user