Determine scanned pdf date upon completion

This ensures that multi-page documents and documents where input is
awaited for a long time before writing use the time the file is written,
as opposed to the time the first page started scanning, in the filename.
master
Jordan Atwood 3 months ago
parent 31a1c24f36
commit 5777ca33fc
Signed by: nightfirecat
GPG Key ID: 615A619C2D73A6DF
  1. 3
      src/.bin/manuscan.sh

@ -13,8 +13,6 @@ SCAN_OUTPUT_DIR=~/Pictures/Scans
TMP_DIR="$(mktemp -d --suffix='scans')" TMP_DIR="$(mktemp -d --suffix='scans')"
while while
scan_output_filename=scan_"$(date +%Y-%m-%d-%H-%M-%S)"
page_number=1 page_number=1
while while
echo "Scanning page $page_number" echo "Scanning page $page_number"
@ -29,6 +27,7 @@ while
echo echo
# convert image sequence to pdf # convert image sequence to pdf
scan_output_filename=scan_"$(date +%Y-%m-%d-%H-%M-%S)"
convert "$TMP_DIR"/*.tiff "${SCAN_OUTPUT_DIR}/${scan_output_filename}_raw.pdf" convert "$TMP_DIR"/*.tiff "${SCAN_OUTPUT_DIR}/${scan_output_filename}_raw.pdf"
# compress pdf # compress pdf

Loading…
Cancel
Save