Created
December 28, 2019 09:41
-
-
Save JosiasAurel/73549dad7946c07ee7c357ddd1cb9272 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mammoth | |
path_to_file = input("") | |
f = open(path_to_file, 'rb') | |
b = open('converted.html', 'wb') | |
document = mammoth.convert_to_html(f) | |
b.write(document.value.encode('utf8')) | |
f.close() | |
b.close() | |
'''instructions : | |
//change "your_file_name" to | |
//the file to be converted | |
// with *.docx extension | |
//place program in the | |
// directory containing your | |
// *.docx file and run it | |
// the output file is an html | |
// file | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment