Skip to content

Instantly share code, notes, and snippets.

@kcole93
Last active June 23, 2021 21:09
Show Gist options
  • Save kcole93/2461324344604ec1911b38f227f5811e to your computer and use it in GitHub Desktop.
Save kcole93/2461324344604ec1911b38f227f5811e to your computer and use it in GitHub Desktop.
Drag-n-drop conversion of MD to DOCX following supplied template
:: MD CONVERT
:: ------------------------
:: Converts all MarkDown files passed as arguments into DOCX following a provided template doc.
::
:: ADAPATED FROM ORIGINAL AUTHOR: Paolo Frigo, [email protected]
:: https://www.scriptinglibrary.com
set list=docx
for %%x in (%*) do (
for %%e in (%list%) do (
pandoc -f markdown-auto_identifiers -s %%x -t docx --reference-doc=Notes_Template.docx -o %%~nx.%%e
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment