.docx and .odt converter to Markdown
Convert, in a batch mode, .docx and .odt files to markdown. Rely on Pandoc.
This script is the ideal companion for marknotes.
Table of Contents
This script is for Windows OS and will convert in batch every supported files (
.odt) to the markdown language (
The utility will :
- convert any
.odtfiles present in the folder and his subfolders,
- create one
- will extract every images present in
.odtand will save them in a
.imagesfolder (there will be one subfolder in
.imagesby processed file),
- after the conversion, the original file will be moved in a
Note : the result
.md will be as close as possible to the original but, please note, the conversion rely entirely on
Pandoc and isn't made by this utility.
Install the script
Put a copy of this script in the folder where you've the file to convert to markdown. Supported files are
Consider the following example :
C:\doc\ file1.docx file1.odt subfolder\ file2.docx file3.docx
If you want to convert, in only one run every files, save the
convert.vbs script to the
Then edit the script with a text editor like
Search the line
Const cPandocExecutable = "C:\Christophe\Tools\pandoc\pandoc.exe"
You'll need to mention the path, on your system, to the
Add a 'Convert to Markdown with Marknotes' in the Windows contextual menu
What easier way than right-clicking and choosing
Convert to Markdown with Marknotes?
To do this, edit the
marknotes_convert.reg file with a text editor like Notepad. Search
C:\\Christophe\\Repository\\marknotes_convert and replace that path with your's i.e. the location on your disk where you've saved the
Pay attention to the double
\, you'll need to use the same syntax.
Below the actual content of the
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\marknotes_convert] @="Convert to Markdown with Marknotes" "icon"="C:\\Christophe\\Repository\\marknotes_convert\\markdown.ico" "AppliesTo"="System.FileName:\"*.doc\" OR System.FileName:\"*.docx\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\marknotes_convert\command] @="\"c:\\windows\\system32\\cscript.exe\" \"C:\\Christophe\\Repository\\marknotes_convert\\convert.vbs\" \"%1\""
Once edited, save the
.reg file and double-click on it. Windows will ask if he need to merge that file with his registry and will warn about this action (can be risky). Let them to do the merge.
Note: to be able to modify the registry, you'll need to have enough permissions on your Windows system.
Start a command prompt (
cmd.exe), go to the folder where you've copy this script and run it by typing
PRs not accepted.