Skip to content

Instantly share code, notes, and snippets.

@alexfouche
Last active January 5, 2020 12:42
Show Gist options
  • Save alexfouche/cdd49a5152a5d00c5ee3b923508c1650 to your computer and use it in GitHub Desktop.
Save alexfouche/cdd49a5152a5d00c5ee3b923508c1650 to your computer and use it in GitHub Desktop.
Run Pandoc from docker image
#!/bin/bash
# First parameter must be file name to convert
where=`dirname "$1"`
what=`basename "$1"`
shift
pushd "$where" >/dev/null
docker run --rm --volume "$where:/data" --user `id -u`:`id -g` pandoc/core "$what" "$@"
popd >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment