Created
February 10, 2013 14:02
-
-
Save gaveen/4749668 to your computer and use it in GitHub Desktop.
Simple script to work with Pandoc. Uses all files inside the current directory with names ending with the file extension $INEXT (assuming they are of the file format $INFMT) to generate files of format $OUTFMT with respective file names and the extension $OUTEXT, styled with the stylesheet $CSSFILE.
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
#!/usr/bin/env bash | |
INFMT="markdown" | |
INEXT="md" | |
OUTFMT="html" | |
OUTEXT="html" | |
CSSFILE="./pandoc.css" | |
for INFILE in $(ls *.$INEXT) | |
do | |
pandoc ./$INFILE -r $INFMT -w $OUTFMT -c $CSSFILE -o ./${INFILE%.*}.$OUTEXT | |
echo "Using file: $INFILE to generate file: ${INFILE%.*}.$OUTEXT" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment