Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 951 Bytes

File metadata and controls

29 lines (18 loc) · 951 Bytes

SA-Convert-Docx-To-Html-With-Python-Mammoth

Source code for the tutorial at StackAbuse.com

You can read the article on StackAbuse

To follow up with the examples, you can either use file-sample_100kB.docx docx file in this repository, or download it from file-examples.com.

HOW TO USE THIS CODE:

  1. Create the project folder:
    $ mkdir MammothTutorial && cd MammothTutorial

  2. Create a virtual environment:
    $ python3 -m venv venv

  3. Activate it:
    Linux: $ source venv/bin/activate Windows: Scripts\activate.bat

  4. Clone this repository with git clone

  5. Install requirements:
    $ pip3 install -r requirements.txt

  6. (Optional) Replace input_filename (in the converter.py) with the path of your docx file

  7. Run the converter.py
    $ python3 converter.py