From c35ede7a2c46606ad422ef1018b69338a68f0081 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 30 Dec 2023 10:27:13 +0100 Subject: docs(hm/pkgs/con2pdf): Add dbg statements --- hm/soispha/pkgs/scripts/apps/con2pdf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hm/soispha/pkgs/scripts/apps/con2pdf b/hm/soispha/pkgs/scripts/apps/con2pdf index 4a45250e..f0942a5c 100644 --- a/hm/soispha/pkgs/scripts/apps/con2pdf +++ b/hm/soispha/pkgs/scripts/apps/con2pdf @@ -84,9 +84,11 @@ process_images_adf() { pdf_counter=0; image_cache="$(mktmp)" while read -r scanned_image; do + dbg "$scanned_image (scanned_image) at $counter (counter)"; echo "$scanned_image" >> "$image_cache" : $((counter += 1)) if [ "$counter" = "$number_of_pages" ]; then + dbg "$counter == $number_of_pages" counter=0; convert_images_flatbed "$image_cache" "${name}_$pdf_counter" "$output_directory" : $((pdf_counter += 1)) @@ -133,13 +135,14 @@ convert_images_flatbed() { set -- while read -r image; do + dbg "setting image: $image"; set -- "$@" "$image" done < "$image_cache" while [ -e "$output_dir/${name}.pdf" ]; do name="${name}_$(tr -dc 'A-Za-z0-9'