We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b43f40b commit db1f267Copy full SHA for db1f267
pydocx/parsers/Docx2Markdown.py
@@ -1,3 +1,5 @@
1
+import sys
2
+
3
from pydocx.DocxParser import DocxParser
4
5
@@ -24,3 +26,18 @@ def italics(self, text):
24
26
25
27
def underline(self, text):
28
return '***' + text + '***'
29
30
31
+def main():
32
+ try:
33
+ path_to_docx = sys.argv[1]
34
+ path_to_html = sys.argv[2]
35
+ except IndexError:
36
+ print 'Must specific the file to convert and the name of the resulting file.' # noqa
37
+ sys.exit()
38
+ html = Docx2Markdown(path_to_docx).parsed
39
+ with open(path_to_html, 'w') as f:
40
+ f.write(html)
41
42
+if __name__ == '__main__':
43
+ main()
0 commit comments