Created
August 2, 2013 18:55
-
-
Save iToto/6142418 to your computer and use it in GitHub Desktop.
pandoc convert md to docx in folder
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 os | |
| import subprocess | |
| for dirname, dirnames, filenames in os.walk('.'): | |
| for filename in filenames: | |
| if '.md' in filename: | |
| print ("converting file: "+filename+" into: "+filename[:-3]+".docx") | |
| subprocess.call("pandoc "+filename+" -f markdown -t docx -s -o "+filename[:-3]+".docx",stderr=subprocess.STDOUT,shell="true") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment