Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API method to get the current style (and style map) of a document #90

Open
CyberFoxar opened this issue Jun 10, 2020 · 1 comment
Open

Comments

@CyberFoxar
Copy link

Hi !
I'm working with weirdly formatted documents and styles partially written in french and I've got troubles getting the style names right with mammoth in order to make my own style map.

I've resorted to use python-docx in order to get all the style names and then making my style map accordingly.

I wish there was an easier, built-in way to get all the styles used in the document.

Thanks !

@GitBruno
Copy link
Contributor

I had a similar problem. Check out this style mapper. It includes some regular expressions in there to remove odd characters from style names. You might want to adjust this to fit your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants