Created
July 11, 2012 09:22
-
-
Save vbajpai/3089257 to your computer and use it in GitHub Desktop.
Convert a Directory Listing of Markdown Files to LaTeX using Pandoc.
This file contains 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
>> export MDEXT='.md' | |
>> python -c "import os; \ | |
filelist = os.listdir(os.getcwd()); \ | |
print [os.system('echo executing: %s;pandoc --listings %s -o %s.tex'%(f, f,os.path.splitext(f)[0])) \ | |
for f in filelist if os.path.splitext(f)[1] == os.environ['MDEXT']]" |
It was meant to be a quick hack.
To honor the comment, the command now expect the extension from a SHELL variable.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
perhaps you should also add the other markdown file extensions (.markdown ...)