Audion DocFlow (Portable)
A portable Windows toolkit for deterministic document cleanup, verification, and processing around DOCX, XLSX, CSV, and Markdown.
Audion DocFlow is built for local, repeatable office-document workflows:
- CLI reads
input\, while the GUI Workbench can directly select an external
folder or one file as Source;
- processed files are written to
output\; - reports are written to
report\; - launcher temp files stay in
._runtime\; - originals are not modified in place.
The project intentionally does not include OCR or AI rewriting. OCR and AI-assisted proofreading belong in separate workflows unless the project scope changes explicitly.
Entry Points
launcher_gui.cmd- NiceGUI/pywebview GUI over the existing command layerlauncher_project.cmd- English CLI launcherlauncher_project_ru.cmd- Russian CLI launcherlauncher_tools.cmd- service/tools launcherbuilder_main.cmd- build/release launcher
The user launchers share the same tool set and support FZF + CMD fallback. The first user screen is grouped by purpose: Rules audit, Styles and hygiene, Find and replace, DOCX control and cleanup, Compare and reconcile, WORD/EXCEL TABLES, Technical operations, and Checks.
The GUI passes the selected Source and Target directly to the backend. The audit section includes anchored audit, fixes/dry-run, and anchor removal; control-free leaf commands run as compact action buttons with separate descriptions.
Service and release actions stay in launcher_tools.cmd and builder_main.cmd; they are intentionally hidden from the first GUI screen.
Included Tools
DOCX
- Style processing: scan/fix headings, appendix titles, list structures, table/figure captions, TOC titles, sections, and style consistency
- Rules audit processor for deterministic corporate rules such as
кв. м,куб. м,№ 1, percent/degree spacing, date suffixes, table-caption typos, and scan-onlyРФ; it can write annotated DOCX copies with visible anchors and later remove those anchors after approval - Text hygiene scan/fix
- Deep DOCX hygiene: a two-pass aggregate run over text hygiene,
deterministic audit rules, and optional document anomaly scan/correction, with one docx_deep_hygiene.md/.docx/.json report
- Document anomalies: read-only scan and safe copied-file correction for
tables, sections, headers/footers, page numbering, fields, TOC, links, bookmarks, lists, blanks, and dangling headings
- Conservative DOCX nonprinting-garbage cleanup: only
U+00ADandw:softHyphen, preserving spaces, tabs, breaks, and line-wrapping controls - Comma-lowercase reporting/fix for suspicious uppercase words after commas inside DOCX table cells
- Russian morphological DOCX/XLSX find/replace via
pymorphy3 - Quality Gate scan and hard-fail mode
- Strip comments
- Accept tracked changes in a simple best-effort mode
- Finalize black + clean
- One-click finalize + gate
- Recursive similar-DOCX detection
- Explicit two-DOCX diff: section matching by similarity, then body text and tables by heading structure, without TOC or package/media noise
- Native two-DOCX comparison through Microsoft Word COM, producing a separate DOCX with Word revisions
- DOCX merge through Microsoft Word COM
- DOCX table stitching after PDF export, table unification, width optimization, orientation adaptation, table fitting, and table extraction to XLSX
- Root
Unify tables in documentcommand for one-pass normalization of tables
inside an existing DOCX: fonts, sizes, borders, cell margins, column balance, and fitting to section margins
- DOCX table extraction to XLSX
- DOCX/PPTX media extraction
- DOCX table-cell margin compaction to
0.1 cm
XLSX, CSV, and Markdown
- XLSX values diff
- DOCX/XLSX/CSV table reconcile into four lists
- Markdown pipe tables to XLSX
- Excel insignificant-row cleanup for fully empty or whitespace-only rows
In the Russian UI, pre-header is translated as Строки перед шапкой. The repeated table header is documented as повторяемая шапка.
Quick Start
- Extract the portable package.
- Put source files into
input\. - Run
launcher_gui.cmd,launcher_project.cmd, orlauncher_project_ru.cmd. - Read processed files in
output\and reports inreport\.
For environment setup or release packaging, use builder_main.cmd. For service/licensing operations, use launcher_tools.cmd.
Checks
Environment verification:
install\verify_portable_env.cmd
Quick smoke:
& '.\runtime\python.exe' '.\tests\smoke.py' --quick
Full smoke covers the scripted tool set:
& '.\runtime\python.exe' '.\tests\smoke.py' --full
The full smoke reports docx_word_compare.py and docx_merge.py as SKIP when Microsoft Word COM is not available in the current session.
Project Layout
.gitattributes- line-ending policy for portable Windows scriptsinput\- source filesoutput\- generated outputsreport\- user-facing reportslogs\- logsconfig\tool_manifest.yaml- GUI command treeconfig\gui_settings.yaml- GUI language, theme, and GUI-only settingsconfig\ui_colors.yaml- GUI color palettes and CSS tokensconfig\rules\rules.yaml- machine-readable audit rule mapconfig\rules\rules.md- human-readable rule split and anchor workflowinstall\- portable environment, verification, and release scriptssystem_core\- Python tools and internal helperssystem_core\ui_nicegui\- NiceGUI shellsystem_core\services\- GUI adapters around CLI commandssystem_core\word_com\- Word COM helper scriptssystem_core\core\cmd_encoding.py- CMD encoding checkersystem_core\license\- release licensing helpersruntime\- embedded Python runtimewheelhouse\- offline wheel cacherelease\- packaged release output._runtime\- launcher temp files
Notes
- User-facing reports and Russian GUI layout are Russian; technical identifiers such as
OK,PASS,FAIL,diff,SHA-256,DOCX A/B, JSON/YAML keys, and CLI options remain technical. - DOCX comparison through Word COM and DOCX merge through Word COM require installed Microsoft Word and available PowerShell.
.cmdfiles must remain UTF-8 without BOM and CRLF-only.install\Check-CmdEncoding.cmdverifies this.- Complex DOCX revision histories and unusual package structures may still require a final visual review in Word.
Canonical Workbench labels
Workbench uses the same Audion Image Tools public vocabulary in every project. Its buttons always keep the same order and labels: Source, Add file..., Target, Reset, Delete, List.
Reset returns to project input/output and does not delete files; Delete clears the current Source and Target only after confirmation. The exact Russian labels are Источник, Добавить файл..., Назначение, Сбросить, Удалить, Список. The Workbench variants Destination, Clear, Цель, and Очистить are not used.