Created
February 13, 2017 07:13
-
-
Save fmarot/abf45eecded80b6164246c0c4ad4c88a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export EXTENSION=jpg | |
export TARGET_DIRECTORY=/home/pierrehenri/Dropbox/scans | |
export TIMESTAMP=$(date +%Y%m%d_%H%M%S) | |
export TMP_FILE=/tmp/scan-$TIMESTAMP.$EXTENSION | |
export OUTPUT_FILE=$TARGET_DIRECTORY/scan-$TIMESTAMP.$EXTENSION | |
export ARCHIVE_DIR=$TARGET_DIRECTORY/vieux-scans/ | |
mkdir -p $TARGET_DIRECTORY | |
mkdir -p $ARCHIVE_DIR | |
mv $TARGET_DIRECTORY/*.* $ARCHIVE_DIR | |
hp-scan --mode=color --size=A4 -r 150 --output=$OUTPUT_FILE | |
nohup dolphin $TARGET_DIRECTORY/ & | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export EXTENSION=pdf | |
export TARGET_DIRECTORY=/home/pierrehenri/Dropbox/scans | |
export TIMESTAMP=$(date +%Y%m%d_%H%M%S) | |
export TMP_FILE=/tmp/scan-$TIMESTAMP.$EXTENSION | |
export OUTPUT_FILE=$TARGET_DIRECTORY/scan-$TIMESTAMP.$EXTENSION | |
export ARCHIVE_DIR=$TARGET_DIRECTORY/vieux-scans/ | |
mkdir -p $TARGET_DIRECTORY | |
mkdir -p $ARCHIVE_DIR | |
mv $TARGET_DIRECTORY/*.* $ARCHIVE_DIR | |
hp-scan --mode=color --size=A4 -r 200 --adf --output=$TMP_FILE | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$OUTPUT_FILE $TMP_FILE | |
nohup dolphin $TARGET_DIRECTORY/ & | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment