fix: skip .doc binary files unchanged + bump v0.4/v1.0.187
Deploy contracts-flask / validate (push) Successful in 0s

This commit is contained in:
2026-06-29 16:07:56 +04:00
parent 2f81fb3645
commit 58bc73385d
4 changed files with 26 additions and 10 deletions
+12 -4
View File
@@ -208,7 +208,10 @@ class TwoPassObfuscator:
all_texts[fname] = text
if doc is not None:
all_docx[fname] = doc
self._scan_regex(text)
elif text == "[DOC binary — not parsed]":
pass # .doc без изменений
else:
self._scan_regex(text)
if self._llm_client:
self._scan_llm_ner(all_texts)
@@ -217,7 +220,10 @@ class TwoPassObfuscator:
results = []
for fname, content, ctype in files:
obf_content = content
if fname in all_docx:
if fname.endswith('.doc'):
# .doc — бинарный, оставляем как есть
pass
elif fname in all_docx:
obf_content = self._replace_in_docx(all_docx[fname])
elif fname.endswith('.pdf'):
txt = all_texts.get(fname, '')
@@ -310,8 +316,10 @@ class TwoPassObfuscator:
text += "\n" + " | ".join(str(c) if c else "" for c in row)
elif ext == '.doc':
# .doc: читаем как текст (конвертация через libreoffice не используется)
text = content.decode('utf-8', errors='replace')
# .doc — бинарный формат, без libreoffice не парсим
# Пропускаем без изменений (не обфусцируем)
text = "[DOC binary — not parsed]"
return text, None
else:
text = content.decode('utf-8', errors='replace')
+1 -1
View File
@@ -64,7 +64,7 @@
<a href="/">Сверка договоров</a>
<span class="sep">|</span>
<strong>DrHider</strong>
<span style="font-size:11px;color:var(--muted);">v0.3</span>
<span style="font-size:11px;color:var(--muted);">v0.4</span>
</header>
<main>
+1 -1
View File
@@ -73,7 +73,7 @@
<body>
<div class="topbar">
<img src="/static/logo.svg" alt="Nubes">
<span class="title">Сверка договоров — LLM AI-driven Event Sourcing <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.0.186-flask</span></span>
<span class="title">Сверка договоров — LLM AI-driven Event Sourcing <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.0.187-flask</span></span>
<div id="pipelineStepper" style="display:flex;gap:8px;font-size:11px;align-items:center;color:var(--muted);">
<span id="stepUpload">○ Загрузка</span><span></span>
<span id="stepClassify">○ Классификация</span><span></span>