A local text formatting organizer for biomedical/academic writing; use it when you need to clean whitespace/line endings while preserving Markdown structures or when normalizing .docx/.md/.txt before submission or proofreading.
Run this minimal command first to verify the supported execution path:
python scripts/init_run.py --help
.docx drafts before running downstream proofreading/QA tools (e.g., academic-proofreader).unix, windows, mac).-, *, 1.)....) unchanged..txt, .md, and .docx input/output.python >= 3.8python-docx >= 1.0.0python scripts/init_run.py --input input.md --output output.md
python scripts/init_run.py -i paper.docx -o paper_clean.docx
python scripts/init_run.py -i input.md --preview
from scripts.text_formatter import TextFormatter, FormatOptions
text = "Line with trailing spaces \n\n\n- item 1\n\t- item 2\n"
options = FormatOptions(
line_ending="unix",
indent="spaces",
indent_size=4,
)
formatter = TextFormatter(options=options)
formatted = formatter.format(text)
print(formatted)
# Step 1: Format organization
python scripts/init_run.py -i paper.docx -o paper_clean.docx
# Step 2: Content/format checking (separate project)
cd ../academic-proofreader
python scripts/init_run.py -i paper_clean.docx
| Parameter | Description | Default |
|---|---|---|
--input / -i | Input file path (.txt / .md / .docx) | Required |
--output / -o | Output file path | Auto-generated |
--line-ending | Line ending: unix / windows / mac | unix |
--indent | Indentation type: spaces / tabs | spaces |
--indent-size | Number of spaces per indent level | 4 |
--preview | Preview mode (no output written) | false |
--docx-font | Font used for Word output | Times New Roman |
--docx-size | Font size used for Word output | 12 |
unix/windows/mac).indent=spaces, using indent_size..docx, applies the same normalization at the text/paragraph level, then writes a new .docx using the configured font and size.text_format_organizer_result.md unless the skill documentation defines a better convention.Run this minimal verification path before full execution when possible:
python scripts/init_run.py --help
Expected output format:
Result file: text_format_organizer_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any