Browse Source

Bugfixes and updated readme.

dev 0.0.2
Franco Masotti 4 years ago
parent
commit
a0d18146c5
  1. 12
      README.md
  2. 1
      fbopt
  3. 11
      spectrscan
  4. 2
      spectrscan.HP_Officejet_2620.conf

12
README.md

@ -18,6 +18,7 @@ paper to pdf converter suitable for texts.
- [Coming soon](#coming-soon)
- [Origin of the name](#origin-of-the-name)
- [Troubleshooting](#troubleshooting)
- [Tested on](#tested-on)
- [License](#license)
[](TOC)
@ -185,6 +186,9 @@ http://www.jpeek.com/articles/linuxmag/2006-08/
- [GNU Parallel](http://www.gnu.org/software/parallel/)
- Execute image post processing jobs in parallel
- [GNU stream editor](https://www.gnu.org/software/sed/)
- Remove leading zeros from filenames
- [Netpbm](http://netpbm.sourceforge.net/)
- Fix the newly scanned immages by truncating the unnecessary parts. This
is mostly useful when scanning from the ADF
@ -227,11 +231,17 @@ This is the error returned by `convert`:
convert: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.
## Tested on
| Distribution | Scanner Name | `vendor:product` | Connection |
|--------------|--------------|------------------|------------|
| Parabola GNU/Linux-libre | HP Officejet 2620 | `03f0:c911` | USB |
## License
![https://www.gnu.org/graphics/gplv3-127x51.png](https://www.gnu.org/graphics/gplv3-127x51.png)
Copyright (C) 2017-2018 frnmst (Franco Masotti)
Copyright (C) 2017-2018 frnmst (Franco Masotti) <franco.masotti@live.com>
spectrscan is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free

1
fbopt

@ -100,6 +100,7 @@ main()
local resolution="${RESOLUTION}"
local source="${SOURCE}"
local unpaper="${UNPAPER}"
local two_sided="${TWO_SIDED}"
local program_name="${0}"
opts="$(getopt \

11
spectrscan

@ -4,7 +4,6 @@
# spectrscan
#
# Copyright (C) 2017-2018 frnmst (Franco Masotti) <franco.masotti@live.com>
# <franco.masotti@student.unife.it>
#
# This file is part of spectrscan.
#
@ -34,12 +33,18 @@ check_software()
pdftk \
parallel \
file \
pamfix
pamfix \
sed \
tr \
sort \
ls \
head
}
get_last_page_side_a()
{
ls spectrscan_out*.pnm | sort --reverse | head -n1 | tr -d [a-z]._
# remove trailing zeros with sed.
ls spectrscan_out*.pnm | tr -d [a-z]._ | sed -e 's/^[0]*//' | sort --reverse --numeric | head -n1
}
select_page_parameters()

2
spectrscan.HP_Officejet_2620.conf

@ -1,7 +1,9 @@
TMP_DIR="$(pwd)/.spectrscan-$RANDOM"
SRC_DIR="$(pwd)"
IMAGEMAGICK='-normalize -level 70%,100%,1.0'
#IMAGEMAGICK='-normalize -level 20%,100%,1.0'
MODE='Lineart'
RESOLUTION='300'
SOURCE='ADF'
UNPAPER='false'
TWO_SIDED='false'