From f1c480411b07b7749bcf7b1586bb0b07635df538 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 23 Oct 2025 15:34:10 -0700 Subject: [PATCH] Enhance output. Fix new file size check. --- convert.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/convert.sh b/convert.sh index e2b07dc..d579873 100755 --- a/convert.sh +++ b/convert.sh @@ -43,8 +43,8 @@ function insert { # Compile all the snippets into one Markdown file. function combine { - logs "Combining documents based on parameters '`echo $@`'." ebook="$1.md" + logs "Combining documents to create '$ebook'." shift for addition in "$@"; do insert "$addition" "$ebook" @@ -60,7 +60,7 @@ function convert { out_dir="$export_dir" ebook="${source//.md/.pdf}" - logs "Creating '$out_dir/$ebook' from '$source'." + logs "Creating '$ebook' from '$source'." book="${ebook//.pdf/-book.pdf}" booklet="${ebook//.pdf/-Booklet.pdf}" @@ -99,12 +99,11 @@ function convert { ## Cleanup ## -log "Clean PDFs" +logs "Clean PDFs" echo "Old:" find "$DIR" -name "*".pdf -exec du -h {} \; -delete | sort -h -find "$export_dir" -name "*".pdf -exec du -h {} \; -delete | sort -h -log "Clean working directory '$work_dir'" +logs "Clean working directory '$work_dir'" if [[ -e "$work_dir" ]]; then rm -rv "$work_dir" fi @@ -145,7 +144,7 @@ convert "$name.md" "(Server Only)" cd "$DIR" echo "New:" -du -had1 *.pdf | sort -h +find "$DIR" -name "*".pdf -exec du -h {} \; | sort -h date