Commit Graph
14 Commits
Author SHA1 Message Date
sebastian 36b6a16fd8 feat(md2doc): heading and paragraph renderers with inline formatting 2026-07-28 10:24:12 +03:00
sebastian 322eaad887 feat(md2doc): XML helpers — borders, shading, multi-level numbering 2026-07-28 10:23:18 +03:00
sebastian e3176a789e feat(md2doc): add skeleton — argparse, STYLES dict, stub converter 2026-07-28 10:22:20 +03:00
sebastian 0b344d3bb8 feat(md2doc): copy _bulletize helper from md2pdf (spec §3.3) 2026-07-28 10:21:33 +03:00
sebastian 2a2c0ed249 chore: add deps test for md2doc (python-docx, lxml) 2026-07-28 10:21:00 +03:00
sebastian bdc7b5e6b2 Plan: fix Task 5 levels=5 → levels=3 (align with test assertion [0,1,2])
Re-audit found regression: Task 5 Step 3 registered 5 levels but test asserted
[0,1,2] in the abstractNum. Test was BEHAVIORAL (correctly failed on no-op
mutation) but also failed on clean code. Aligning to levels=3 (consistent
with Task 3, more realistic for typical markdown nesting).
2026-07-28 00:03:55 +03:00
sebastian e36e87966d Plan: fix H3 spy tests + _render_pre trailing empty
Empirical audit (Stage 2) found 2 critical spy tests guarding the H3 keystone:
- test_register_multilevel_numbering_creates_abstractNum_with_3_levels
- test_nested_bullet_list_uses_increasing_ilvl

Both passed when register_multilevel_numbering was mutated to 'return 1'
(no XML written). Rewrote both to BEHAVIORAL form: trace numId → w:num →
w:abstractNumId → w:abstractNum, assert THAT abstractNum has ilvl=[0,1,2].

Also: _render_pre now drops trailing empty line (text.split('\n') artifact).
2026-07-28 00:00:07 +03:00
sebastian 5891ed892c Plan: address Stage 1 re-review feedback
Fixes:
- CRITICAL: Task 2 Step 3 no longer overwrites md2doc.py — extends in place
- MAJOR: COMMON.keep_with_next_headings now wired into _render_heading
- MINOR: added test for keep_with_next assertion
- MINOR: Task 9 note about footer param preservation
- MINOR: _render_pre now preserves newlines via add_break()
- MINOR: Notes section documents fixture location, security, COMMON wiring
2026-07-27 23:51:21 +03:00
sebastian 5f8c2bdbc2 Plan: address Stage 1 reviewer feedback
Fixes:
- Critical: add Task 1.5 (_bulletize copy with complete code)
- Major: enrich STYLES dict (5 styles now visually distinct)
- Major: implement COMMON dict partial (keep_with_next on headings)
- Major: inline code now gets run-level shading (spec §4)
- Minor: heading color assertion added
- Minor: Task 5 Step 4.5 H3 keystone manual checkpoint (spec §4.2)
- Minor: Task 8 exact line numbers from Research Summary
- Minor: Task 10 renamed to characterization test
2026-07-27 23:46:45 +03:00
sebastian 64c77d27fc Update spec after Stage 1 + Stage 2 review
Stage 1 (textual): 12 issues found, all fixed (re-ran clean on major axes)
Stage 2 (empirical): 6 claims tested with real python-docx code
  - H1, H2, H4, H5: SURVIVED (XML manipulation routes verified)
  - H3: PARTIALLY-REFUTED — CRITICAL. List Bullet 2/3 style names exist
    but produce flat lists. Spec now mandates manual numbering XML.
  - B2: claim SURVIVED, presentational_hints hypothesis REFUTED.
    Decision: eliminate --forms from md2pdf (YAGNI).
2026-07-27 19:47:34 +03:00
sebastian 23deb7b3f5 Add md2doc design spec
Design for new md2doc.py (Markdown to DOCX converter) plus two bug-fixes
for md2pdf.py (--footer dead in CLI, --forms produces no AcroForm).

Spec includes 5 empirical hypotheses (H1-H5) about python-docx capabilities
that must be validated before implementation.
2026-07-27 19:34:57 +03:00
sebastianandClaude Opus 4.5 630660adb2 Remove minimal style, add mono style, make elegant default
- Removed minimal style (not useful)
- Added mono style with JetBrains Mono font
- Changed default from default to elegant
- Fixed bullet consistency with list-style-type: disc

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:01:58 +02:00
sebastianandClaude Opus 4.5 48829d4007 Fix bullet points for PDF text extraction
Use list-style-position: inside so bullets are part of text flow,
not separate positioned elements. Fixes copy/paste issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:32:08 +02:00
sebastianandClaude Opus 4.5 c93974fd3d Initial commit: md2pdf markdown to PDF converter
- Python script with weasyprint for high-quality PDF output
- Wrapper script for easy execution with bundled venv
- Multiple styles: default, minimal, dark, elegant
- Supports single file or directory conversion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:28:59 +02:00