How to export .docx style_map to mammoth python and embed?

Viewed 204

I have a .docx document that I am trying to convert to html. It has some custom styles. Can the styles be exported to mammoth or embedded with the word document directly (word ui)?

I did see some comments about using python-docx to export style to mammoth but they were light on details.

Below is the code I used to access the styles in the document using docx

from docx import Document
from docx.enum.style import WD_STYLE_TYPE

document = Document("some.docx")

styles = document.styles

# Do you choose a style from styles and embed? 
mammoth.embed_style_map(docx_file, styles[0] )

Is there a way to export those styles to mammoth? Thank you in advance

0 Answers
Related