Write pages to directory

This commit is contained in:
Matt McWilliams 2023-03-04 18:51:22 -05:00
parent 1ddea3ad56
commit 5924c65b39
1 changed files with 13 additions and 1 deletions

View File

@ -11,6 +11,16 @@ if [[ "${2}" == "" ]]; then
exit 2 exit 2
fi fi
if [[ "${3}" == "" ]]; then
echo "Please an output directory for pages"
exit 3
fi
if [ ! -d "${3}" ]; then
echo "${3} output directory does not exist"
exit 4
fi
if [ -f "${2}" ]; then if [ -f "${2}" ]; then
echo "Exporting frames from ${2}..." echo "Exporting frames from ${2}..."
OUTPUT=$(mktemp -d) OUTPUT=$(mktemp -d)
@ -79,9 +89,11 @@ for ((i=0;i<${PAGES};++i)); do
bash white_fourcell.sh $DPI "${f4}" "${dest}" bash white_fourcell.sh $DPI "${f4}" "${dest}"
args="${args} ${dest}" args="${args} ${dest}"
fi fi
bash apply_image.sh ~/Desktop/page_$i.tiff "${1}" ${args} bash apply_image.sh ${3}/page_$i.tiff "${1}" ${args}
done done
echo "Wrote ${3}/page_$i.tiff"
# x determine dpi # x determine dpi
# convert frame to white_fourcell # convert frame to white_fourcell