Created
June 30, 2017 19:02
-
-
Save sodejm/bc0eab54c2561733ff9dae096c2b11d7 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
| # Author: sodejm | |
| # Add to bash_profile as a quick way to conver markdown notes to word doc | |
| # requires pandoc to be installed | |
| # use: md2doc file1.md | |
| # this will output file1.doc | |
| # Note: this does not handle docs with spaces in the filename well so feel free to modify that or just name things like file_1.md | |
| function md2doc() { | |
| echo "Converting a markdown file to docx" | |
| filetoconvert=$1 | |
| fnamepattern="${filetoconvert##*/}" | |
| fname="${fnamepattern%.*}.docx | |
| pandoc -s -o $fname $1 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment