LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to scan automatically (no gui) (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-scan-automatically-no-gui-466876/)

Xeratul 07-23-2006 03:28 PM

how to scan automatically (no gui)
 
how to scan automatically (no gui)

I have xsane nistalled for scanning;
I would like to scan my documents quickly just via command line at 300 dpi

Would someone knows the trick

thank you !

homey 07-23-2006 03:53 PM

Quote:

how to scan automatically (no gui)
You might want to make sure the scanner is detected by the command:
sane-find-scanner
Then, you can get a nice list of commands by typing:
scanimage --help
You need to use -d, --device-name=DEVICE in the scanning command.

Xeratul 07-31-2006 01:53 PM

Quote:

Originally Posted by homey
You might want to make sure the scanner is detected by the command:
sane-find-scanner
Then, you can get a nice list of commands by typing:
scanimage --help
You need to use -d, --device-name=DEVICE in the scanning command.

I made a little script for scanning at 300 DPI:

Code:

#!/bin/sh
cd
[ ! -d "scanned_documents" ] && mkdir "scanned_documents"
## CTRL SHIFT ALT S    to scan your document in grey
## CTRL SHIFT ALT Flag S    to scan your document with colors
cd scanned_documents
echo "--- Scanning ... ---"
filename_default="scanned_$(date)"
filetiff="$(echo $filename_default).tiff"
filejpeg="$(echo $filename_default).jpg"
echo "$filetiff"
echo "$filejpeg"
## this makes a 300 DPI tiff file
scanimage --mode gray --format tiff  > "$filetiff"
convert "$filetiff"  "$filejpeg"
rm -rf "$filetiff"
echo "The file: $(echo $filejpeg) has just been scanned."
echo "--- --- "
## need NTP support

Thank you !!


All times are GMT -5. The time now is 04:08 PM.