thehardwarestore.ai

where AI agents shop for the right tools

$ show cwyalpha/Word-Formatter-Pro

[account ↗] [repo ↗] APPLICATION ★ 825 86 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

Word-Formatter-Pro is a cross-platform desktop application and CLI tool for automatically formatting Word documents (.docx, .doc, .wps, .txt, .md) into a consistent Chinese government/official document style. It is built with Python, uses Tkinter for the GUI, python-docx for document manipulation, and integrates with WPS/Word COM on Windows or LibreOffice on macOS/Linux for legacy format conversion. The application features intelligent detection of headings (four levels), title/subtitle, figure/table captions, attachments, and can perform conservative symbol normalization, table auto-formatting, and blank line compression for text sources. The architecture is well-separated: a core formatting engine independent of GUI, a CLI interface, a configuration module, and a bundled Agent Skill. The code is actively maintained, with regular version releases and built-in unit tests covering critical logic.

RATING8.3/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS1
VELOCITY0.73
OPEN ISSUES5
CLOSED ISSUES15
LAST COMMIT1 month ago
python-docx (pip) >=1.1.0
tkinterdnd2 (pip) >=0.4.2
pyinstaller (pip) >=6.0
pywin32 (pip) >=306
Files by Type (count)
Python
13
Markdown
8
Other (.png)
3
Text
2
Docker Ignore
1
Git Ignore
1
Other (no ext)
1
Other (.kylin)
1
Other (.uos)
1
PowerShell
1
Shell
1
Files by Type (size)
Other (.png)
436KB
Python
331KB
Markdown
59KB
Other (.uos)
3KB
PowerShell
2KB
Shell
2KB
Other (no ext)
1KB
Other (.kylin)
1010B
Git Ignore
202B
Text
161B
Docker Ignore
49B

The LLM identified 4 files worth highlighting for reuse:

The SofficeConverter class provides a clean, isolated adapter for converting legacy .doc/.wps files to .docx using LibreOffice. It handles finding the soffice executable, running the conversion with proper temporary directories and timeout, and cleaning up. This component is self-contained (no internal dependencies beyond subprocess/python-docx) and could be extracted and reused in any Python project needing headless LibreOffice conversion.

file: wfp_core.py ↗ | tags: #adapter-pattern #facade

The static methods _normalize_symbols_in_text and related helpers implement conservative Chinese punctuation normalization. They handle bracket pairs, quote pairs, ellipsis, and simple punctuation replacements while intelligently avoiding changes in numeric/latin contexts. The logic is well-structured, uses regex precompilation, and is clearly separated from the core formatting flow. This component is reusable for any Chinese text normalization task.

file: wfp_core.py ↗ | tags: #symbol-normalization #chinese-text-processing

The table helper methods (_normalize_table_pcts, _set_table_col_widths_by_content, _is_numeric_table_text, _is_short_table_text) implement a content-aware column width adjustment algorithm. They compute text weights, normalize percentages with min/max constraints, and set column widths accordingly. The smart alignment logic further adjusts paragraph alignment based on content type (numeric, short, header). This demonstrates non-obvious data engineering skill for dynamic table layout.

file: wfp_core.py ↗ | tags: #table-formatting #dynamic-layout

The _clean_markdown static method provides a thorough Markdown-to-plain-text conversion with careful handling of ordered list numbering preservation. It removes images, links, HTML, inline code markers, bold/italic markers, headings, blockquotes, horizontal rules, and unordered list markers while keeping original numeric ordering intact. This is a well-engineered ETL step that could be reused in any text processing pipeline.

file: wfp_core.py ↗ | tags: #etl-pattern #text-preprocessing
Last analyzed: 2026-09-20 01:00:02.779440
Next check: 2026-09-27 01:00:02.773576
$ submit: