diff --git a/.config/shell/bin/pandoc-make b/.config/shell/bin/pandoc-make index c63f0ab..fa6f553 100755 --- a/.config/shell/bin/pandoc-make +++ b/.config/shell/bin/pandoc-make @@ -5,18 +5,20 @@ # pandoc-make html *.md usage() { + SCRIPT="${0##*/}" cat <<-EOF Usage: - $0 [output_type] [pandoc_args for file 1] [pandoc_args for file 1] [input_files] + $SCRIPT [output_type] [pandoc_args for file 1] [pandoc_args for file 1] [input_files] Examples: - $0 pdf *.md - $0 .docx *.md # leading .'s are automatically removed from the output format + $SCRIPT pdf *.md + $SCRIPT .docx *.md # leading .'s are automatically removed from the output format - Note: - 1) To put a file in pandoc arguments without having it be compiled to its own document, put a './' or '../' at the start of the path to it - - You can have as many arg/file combinations you want - - The argument array is cleared between input files + Notes: + 1) To put a file in pandoc arguments without having it be compiled to its + own document, put a './' or '../' at the start of the path to it + - You can have as many arg/file combinations you want + - The argument array is cleared between input files EOF # TODO: # 2) You can set default arguments in the array PANDOC_DEFAULT_ARGS and export them for this script to use