Skip to content

feat: implement word-to-html-swift converter #49

@PsychQuantClaw

Description

@PsychQuantClaw

Summary

Restore and finish word-to-html-swift as a proper Layer 3 converter in macdoc.

The current main branch only carries the package manifest / README / CLI wiring from the earlier merge, but the tracked converter source and tests are missing. This follow-up issue lands the actual converter implementation.

Conversion Requirements

  • Input: .docx
  • Output: HTML stream / .html
  • Architecture: direct Word → HTML path to preserve semantics without Markdown hub loss
  • Protocol: implement DocumentConverter with StreamingOutput

Layer 1 / Core Dependencies

  • ooxml-swift for Word parsing
  • common-converter-swift (DocumentConverter, StreamingOutput, ConversionOptions)

Implementation Notes

  • Convert headings, paragraphs, blockquotes, code blocks, tables, lists, hyperlinks, footnotes, and inline formatting
  • Support optional frontmatter and extracted figures directory
  • Keep package independent under packages/word-to-html-swift/
  • Ensure CLI command macdoc word-to-html works against the restored package source

Test Strategy

  • Package-level tests for headings / lists / tables / hyperlinks / images / footnotes / inline formatting
  • Verify HTML shell generation and figure extraction
  • swift test inside packages/word-to-html-swift

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions