Skip to content

Instantly share code, notes, and snippets.

@Nervengift
Last active March 9, 2023 14:20
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nervengift/1414634366e79f5fcbb4 to your computer and use it in GitHub Desktop.
Save Nervengift/1414634366e79f5fcbb4 to your computer and use it in GitHub Desktop.
Automatically build markdown file on change using pandoc
function pandoc-md {
while true ;do
inotifywait -e modify $1 2>/dev/null
date
pandoc $1 -V geometry:margin=2cm -o $1.pdf
done
}
function pandoc-md
while true
inotifywait -e modify $argv[1] 2>/dev/null
date
pandoc $argv[1] -V geometry:margin=2cm -o $argv[1].pdf
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment