Skip to content

Instantly share code, notes, and snippets.

@kafran
Created June 12, 2018 15:13
Show Gist options
  • Save kafran/46b1d798cef7b3aa48e9a138f99902cf to your computer and use it in GitHub Desktop.
Save kafran/46b1d798cef7b3aa48e9a138f99902cf to your computer and use it in GitHub Desktop.
Script for scanning with Kodak ScanMate i1150
#!/bin/bash
# PATH TO THE SCRIPT FOLDER
BASE="/home/user/ScanFolder"
START=0
if [ -z "$1" ]; then
echo "Usage: $0 <jobid> <start_page>"
echo
echo "Please provide unique jobid name as first parameter"
echo "If you get stuck, provide the continuation page as the second parameter"
echo "Example: ./01-scan.sh FOLDER_NAME 28"
exit 1
fi
if [ -z "$2" ]; then
START=1
else
START=$2
fi
OUTPUT="$BASE/$1"
mkdir -p "$OUTPUT"
echo 'scanning...'
scanimage \
--device-name="kds_i11xx:i1100" \
--format=tiff \
--batch="$OUTPUT/scan_%03d.tiff" \
--batch-start=$START \
--progress \
--profiles="Black and White Perfect Page Document" \
--mode=Gray \
--duplex=both \
--depth=8 \
--resolution=300 \
-x 210 -y 297 \
--croppingmode=Automatic \
--page-width=210 \
--page-height=297 \
--blankimagemode=content \
--blankimagecontent=10 \
--imagerotateorthogonal=auto \
echo "Output in $OUTPUT/scan*.tiff"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment