tantale / docx_utils

Creation and manipulation of Open XML documents (mainly docx).
MIT License
2 stars 0 forks source link

Support unflattening flatopc docx files #2

Open jessrosenfield opened 4 years ago

jessrosenfield commented 4 years ago

It would be preferable to be able to do the reverse transformation, going from an flat opc xml file to a zipped docx file.

laurent-laporte-pro commented 4 years ago

Actually, I think the reverse could be done by Microsoft Word… Need to check that, of course.

jessrosenfield commented 4 years ago

I'm looking for a workflow that doesn't involve MS Word. For example, with flat opc files (I have a data source that provides them in that format) I am unable to plug the file into tools that preview the document or convert the docx file into other formats (eg: Google Docs, Apple Pages, https://www.npmjs.com/package/mammoth, https://www.npmjs.com/package/textract). It might be outside the scope of what your library intends to do, but I figured because it offers a certain transformation, it might be befitting to offer the reverse transformation as well.

tantale commented 4 years ago

Well, I started working on the implementation of the Flat OPC to Open Office XML converter. It's a draft.

If you want to contribute, you can fork the feature/emboss_flat_opc branch.

Take a look at the "todo" in the source code. To complete the work, we need to find a translation table between the XML root node of each part and the Override content type. See: Open-XML-SDK.

When you are ready, you can do a PR.

jessrosenfield commented 4 years ago

Thanks so much for the context :D I won't be able to get around to it right away but would love to try to tackle this.