Created
June 7, 2016 03:18
-
-
Save bertabus-zz/c180c8aadffba65f95e2c5409fdecd5c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/bin/sh | |
| # Usage scanPaper /output/path/forScan | |
| # Scan an '11-8.5' paper and convert to pdf | |
| # Place pdf in /output/path/forScan | |
| # Does not remove /tmp/scan by default, uncomment last | |
| # line to remove temporary file afterwards | |
| scanimage --mode Binary --resolution 600 -x 215.9 -y 279.4 > /tmp/scan.ppm | |
| ppm2tiff /tmp/scan.ppm /tmp/scan.tiff | |
| tiff2pdf /tmp/scan.tiff > /tmp/scan.pdf | |
| md5=$(md5sum /tmp/scan.pdf | cut -d ' ' -f 1) | |
| date_stamp=$(date "+%Y_%m_%d") | |
| mv /tmp/scan.pdf $1/${date_stamp}\ ${md5}.pdf | |
| # rm /tmp/scan.* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment