This bug could be fixed by documentation --- there is no documentation with the package about the scripts!
To get this working, I had to understand scanbd.conf, which is in directory with 72 other .conf files. It took an hour to just understand what I was supposed to do.
I like Dylan's default script. I would also add to the log "This script is located at /etc/scanbd/scripts/test.script if you want to edit it."
For other users' information, this was the script I ended up using:
DATETIME=`date +"%FT%T.%N"`
echo Datetime is $DATETIME >> /tmp/scanbd_tests.txt
DIR=`mktemp -d`
cd $DIR
echo made and moved to $DIR >> /tmp/scanbd_tests.txt
echo scanning >> /tmp/scanbd_tests.txt
#scanimage -L # tells you what devices are on the system.
scanimage -b --format png -d 'fujitsu:ScanSnap S1500:5856' --source 'ADF Front' --resolution 150
# WARN: PDF generation was disabled by default.
# Re-enable it by editing /etc/ImageMagick-6/policy.xml
echo converting *.png >> /tmp/scanbd_tests.txt
convert *.png scan.pdf
This bug could be fixed by documentation --- there is no documentation with the package about the scripts!
To get this working, I had to understand scanbd.conf, which is in directory with 72 other .conf files. It took an hour to just understand what I was supposed to do.
I like Dylan's default script. I would also add to the log "This script is located at /etc/scanbd/ scripts/ test.script if you want to edit it."
For other users' information, this was the script I ended up using:
#! /bin/sh
echo >> /tmp/scanbd_ tests.txt tests.txt
echo Starting. >> /tmp/scanbd_
echo Running as `whoami` >> /tmp/scanbd_ tests.txt
DATETIME=`date +"%FT%T.%N"` tests.txt
echo Datetime is $DATETIME >> /tmp/scanbd_
DIR=`mktemp -d` tests.txt
cd $DIR
echo made and moved to $DIR >> /tmp/scanbd_
echo scanning >> /tmp/scanbd_ tests.txt
#scanimage -L # tells you what devices are on the system.
scanimage -b --format png -d 'fujitsu:ScanSnap S1500:5856' --source 'ADF Front' --resolution 150
# WARN: PDF generation was disabled by default. k-6/policy. xml tests.txt
# Re-enable it by editing /etc/ImageMagic
echo converting *.png >> /tmp/scanbd_
convert *.png scan.pdf
echo OCR-ing >> /tmp/scanbd_ tests.txt
ocrmypdf scan.pdf scan_ocr.pdf
DIRNAME= /home/mike/ Desktop/ Home/life/ scanned_ documents/ "scan_$ {DATETIME} .pdf"
FILENAME=
echo moving to "$DIRNAME$FILENAME" >> /tmp/scanbd_ tests.txt
mv scan_ocr.pdf "$DIRNAME$FILENAME"
echo changing owner of "$DIRNAME$FILENAME" >> /tmp/scanbd_ tests.txt
chown mike:mike "$DIRNAME$FILENAME"
echo Done. >> /tmp/scanbd_ tests.txt