From 5f25dca7628bbfe83204af9a64805fe5c3b9ef82 Mon Sep 17 00:00:00 2001 From: spinach <19keegandeppe@gmail.com> Date: Tue, 28 Feb 2023 14:45:43 -0500 Subject: [PATCH] working with auto title and base level config (toc) --- stitch | 71 ++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/stitch b/stitch index fa5f90f..ffdc46e 100755 --- a/stitch +++ b/stitch @@ -1,12 +1,23 @@ #!/usr/bin/env bash +usage() { + cat < $header - -if [ -z "$outputname" ] ; then - outputname=test -fi -if [ -f "$outputname" ] ; then - rm "$outputname" -fi -pandoc "$working_dir/header.md" "$directory/*.md" -o "$outputname.pdf" +formatting "$TITLE" > $header +pandoc $header $working_dir/*.md --toc --toc-depth=1 -o "$OUTPUT.pdf" +# cleanup rm "$working_dir/header.md" + +