3 ms·
I wonder if this tool by MSFT is able to handle that: https://github.com/microsoft/markitdown https://github.com/microsoft/markitdown I was amazed when I real
by paulbjensen 1y ago
I wonder if this tool by MSFT is able to handle that:
https://github.com/microsoft/markitdown https://github.com/microsoft/markitdown
I was amazed when I realised that Word docs were just zip files and you could poke around in the xml files embedded inside of them.
I almost implemented a working React -> Word document renderer back in 2017, but it didn't have support for creating the xml tags with : inside of them (which OOXML documents use).
- strongpigeon 1y agoTechnically, they're a bit more than just zip files (they're OPC containers [0]), but if you're hand editing the file content it doesn't really matter. [0] Open Package Convention: https://en.wikipedia.org/wiki/Open_Packaging_Conventions https://en.wikipedia.org/wiki/Open_Packaging_Conventions
- favorited 1y agoEven though markitdown is a Microsoft project, it's just a thin wrapper around a bunch of 3rd party Python packages. For example, to go from docx to Markdown, it uses mammoth to convert docx to HTML[0], then uses markdownify to convert the HTML into Markdown[1]. [0]https://github.com/microsoft/markitdown/blob/da7bcea527ed04cf6027cc8ece1e1aad9e08a9a1/packages/markitdown/src/markitdown/converters/_docx_converter.py#L78 https://github.com/microsoft/markitdown/blob/da7bcea527ed04c... [1]https://github.com/microsoft/markitdown/blob/da7bcea527ed04cf6027cc8ece1e1aad9e08a9a1/packages/markitdown/src/markitdown/converters/_markdownify.py#L8 https://github.com/microsoft/markitdown/blob/da7bcea527ed04c...