lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 004: ID 03f0:3817 Hewlett-Packard LaserJet P2015 series Bus 001 Device 002: ID 04f9:60a1 Brother Industries, Ltd Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
dpkg -i brscan4-0.4.1-3.amd64.deb
brscan4. ( ... 108594 .) brscan4 ( brscan4-0.4.1-3.amd64.deb)... brscan4 (0.4.1-3) ... This software is based in part on the work of the Independent JPEG Group.
# Brother scanners ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"
dpkg -i brscan-skey-0.2.4-0.amd64.deb
brscan-skey. ( ... 108623 .) brscan-skey ( brscan-skey-0.2.4-0.amd64.deb)... brscan-skey (0.2.4-0) ...
password= IMAGE="sh /opt/brother/scanner/brscan-skey/script/scantoimage-0.2.4-0.sh" OCR="sh /opt/brother/scanner/brscan-skey/script/scantoocr-0.2.4-0.sh" EMAIL="sh /opt/brother/scanner/brscan-skey/script/scantoemail-0.2.4-0.sh" FILE="sh /opt/brother/scanner/brscan-skey/script/scantofile-0.2.4-0.sh" SEMID=b
FILE="sh /home/admin/file.sh"
#! /bin/sh set +o noclobber # # $1 = scanner device # $2 = friendly name # ## resolution=300 device=$1 ## temp_dir=/tmp/scan_"`date +%Y-%m-%d-%H-%M-%S`" mkdir -p $temp_dir cd $temp_dir ## if [ "`which usleep 2>/dev/null `" != '' ];then usleep 10000 else sleep 0.01 fi ## ## =40 ## ## 4 ## ## , ## tiff <u>scanimage</u> --batch-count=40 --source 'Automatic Document Feeder(centrally aligned,Duplex)' -x 210 -y 297 --device-name "$device" --resolution $resolution –format=tiff ## tif- jpg- 90% <u>convert</u> -quality 90% *.tif im.jpg ## tif- rm *.tif ## jpg- <u>exiftool</u> -d %Y-%m-%d_%H.%M-%S%%-c.%%e "-filename<FileModifyDate" $temp_dir ## 111 ## .. ## find . -size +111k -exec mv {} /srv/scan \; ## rm -r $temp_dir ## - saned ## , root cd /srv/scan chown saned:saned *.jpg
apt-get install libsane sane-utils
apt-get install imagemagick
apt-get install libimage-exiftool-perl
#! /bin/sh if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then if [ "$2" = "2" ];then echo ' no option :register all MFCs' echo ' -t (--terminate) :terminate this tool' echo ' -a (--add MFC) :register the specified MFC' echo ' -d (--delete) MFC :exclude the specified MFC' echo ' -p (--passwd) PASSWORD :set the password' echo ' -u (--username) USERNAMR :set the user name' echo ' -l (--list) :list the available MFCs' echo ' -m (--mailto) :mail address (scan to e-mail)' echo ' --refresh :refresh setting' echo ' --reset :reset the configuration file' echo ' --diagnosis :print diagnosis data' echo ' -h --help :help' fi echo ' Copyright 2007-2012 Brother Industries, Ltd' exit 0 fi if [ "$1" = "-l" ] || [ "$1" = "--list" ]; then /opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0 $* exit 0 fi if [ "$1" = "-f" ];then /opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0 $* else /opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0 $*& fi
#! /bin/sh if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then ## if [ "$2" = "2" ];then echo ' no option :register all MFCs' echo ' -t (--terminate) :terminate this tool' echo ' -a (--add MFC) :register the specified MFC' echo ' -d (--delete) MFC :exclude the specified MFC' echo ' -p (--passwd) PASSWORD :set the password' echo ' -u (--username) USERNAMR :set the user name' echo ' -l (--list) :list the available MFCs' echo ' -m (--mailto) :mail address (scan to e-mail)' echo ' --refresh :refresh setting' echo ' --reset :reset the configuration file' echo ' --diagnosis :print diagnosis data' echo ' -h --help :help' ## fi echo ' Copyright 2007-2012 Brother Industries, Ltd' exit 0 fi if [ "$1" = "-l" ] || [ "$1" = "--list" ]; then /opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0 $* exit 0 fi if [ "$1" = "-f" ];then /opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0 $* else /opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0 $*& fi
/opt/brother/scanner/brscan-skey/brscan-skey
brscan-skey
brscan-skey -t
#! /bin/sh work_dir=/srv/scan archiv_dir=/srv/scan/ mkdir -p $archiv_dir ## , - cd $work_dir mv *.jpg $archiv_dir ## find -maxdepth 1 -type f -mtime +1 -exec mv {} $archiv_dir \; ## 7 cd $archiv_dir find . -type f -mtime +7 -delete
## /home/admin/del.sh
Source: https://habr.com/ru/post/187168/
All Articles