Word Document to HTML or Markdown with Python
An Example Use of Python for Beginner.
This short article will guide you how you can convert the .docx word document to the simple web page document (.html) or Markdown document (.md) in an easy way with some help of Python-based CLI — Mammoth.
According to the statistic from Statista survey (Jan 6, 2020), the Microsoft Office Suite is the most popular office software. You can easily take a quick note, short report, tutorial document, etc. with the Microsoft Word. And, you might want to share the document content with some of your friends, colleagues, clients as a web document (.html)) or Markdown document (.md). In the past, it might be costly to host some web documents on the web, but nowadays the cloud service is very cheap or even free for a public document (eg. GitHub Pages).
Let’s Get Started.
Install Mammoth
To install the Mammoth, please make sure that you have Python and PIP installed on your PC. Then, you can open CMD or Terminal and use the following command:
$ pip install mammothConvert Docx to HTML
Using CLI:
$ mammoth input_name.docx output_name.htmlUsing Python:






