sane-backends/create_hpaio.desc_from_models.dat
Johannes Meixner 7ffdd89b52 Accepting request 949860 from home:StefanBruens:branches:graphics
- Upgraded to sane-backends version 1.1.1
  * Backends
    + epson2: Fixed support for many scanners that don't support
      focus command.
    + epson2: Improve reliability of long scans.
    + epsonds: Implemented support for the following Epson scanners:
      - DS-1610, DS-1630, DS-1660W, DS-310, DS-320, DS-360W, DS-410,
        DS-530, DS-530II, DS-531, DS-535, DS-535H, DS-535II, DS-570W,
        DS-570WII, DS-571W, DS-575W, DS-575WII, DS-70, DS-80W
      - ES-200, ES-300W, ES-300WR, ES-400, ES-400II, ES-50, ES-500W,
        ES-500WII, ES-500WR, ES-55R, ES-580W, ES-60W, ES-60WB,
        ES-60WW, ES-65WR,
      - ET-2700 Series, ET-2710 Series, ET-2810 Series,
        ET-M2140 Series, ET-M3140 Series,
      - EW-052A Series,
      - FF-680W,
      - L3150 Series, L3200 Series, L3210 Series, L3250 Series,
        L4150 Series,
      - M2140 Series, M3140 Series,
      - RR-60, RR-600W, RR-70W,
      - XP-2100 Series, XP-2150 Series
    + epson2: Marked XP-452 455 series as supported in
      documentation
    + escl: Fixed scanning problems on certain scanners due to
      incorrect URL being used (#479)
    + escl: Fixed support for different resolutions when using
      JPEG format
    + escl: Fixed handling of ipp-usb redirects to localhost
      which previously caused certain scanners to be always
      reported as busy
    + escl: Added support for Brother DCP-J772DW and Epson
      ET-2750 scanners
    + escl: Marked the following scanners as supported in
      documentation:
      - Canon PIXMA G4511
      - Canon PIXMA TR4550 Series
      - Canon PIXMA TR4551 Series
      - Epson ET-6100
    + escl: Implemented support for disabling PDF output on
      scanners where it's broken (#510)
    + escl: Implemented support for Canon PIXME TR4520 and
      TR7500 scanners
    + genesys: Improved scan quality on Canon LiDE 35/40/50/60
      by using brighter LED illumination
    + genesys: Fixed control of contrast and brigthness on certain
      scanners (#271)
    + genesys: Fixed crashes when handling slightly unexpected
      conditions (#464)
    + genesys: Fixed support for Plustek Opticfilm 7200 v2 scanner
    + genesys: Fixed button support on HP ScanJet G4010
    + genesys: Fixed compilation on gcc-4.8
    + genesys: Fixed incorrect LED exposure calculation leading to
      wrong color balance on certain resolutions on gl841 scanners
    + genesys: Improved gray scan quality on Canon LiDE 110, 120,
      210, 220 (#106, #52)
    + genesys: Fixed issue of motor becoming stuck at certain
      resolutions on Canon LiDE 50 and possibly other gl841
      scanners (#357)
    + genesys: Fixed periodic black lines in gray scans on Canon
      LiDE 80
    + genesys: Removed support for broken 75 and 100 dpi hardware
      resolutions to fix preview scans (#383). These resolutions
      did not have any benefit compared to next smallest 150 dpi
      resolution
    + genesys: Add support for running in embedded environments
      that don't support threads
    + genesys: Fixed gray scans to use white color for illumination
      instead of red on Canon LiDE 35/40/50/60 and potentially
      other gl841 scanners. Old behavior can be restored via the
      color filter setting to select specific color component for
      the gray scan
    + genesys: The genesys backend is now distributed under GPL v2
      or later license. Previously there existed an exception that
      allowed additional uses of the backend
    + gt68xx: Fixed several memory issues that can potentially lead
      to crashes or increased memory use
    + hp4200: Fixed crash when using HP ScanJet 4200C (#454)
    + microtek: Fixed support for embedded platforms using uclibc
    + pieusb: Implemented support for Reflecta RPS 10M scanner
    + pieusb: Fixed support for automatically advancing slides on
      DigitDia 4000
    + pixma: Fixed compliation with NDEBUG macro defined
    + pixma: Marked Canon PIXMA G4511 as supported in documentation
    + scangearmp2: Mark GX6000, GX7000, TS5400 and MX455 series
      as supported
  * Frontends
    + Improved documentation of scanimage concerning options
      provided by backends
    + scanimage: Improved help to specify which options are
      advanced
    + scanimage: Implemented support for PDF output format
- Cleanup create_hpaio.desc_from_models.dat:
  * Remove scanners unsupported by hplip (scan-type < 0)
  * Simplify and significantly speed it up

OBS-URL: https://build.opensuse.org/request/show/949860
OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=106
2022-01-31 13:34:31 +00:00

90 lines
2.8 KiB
Bash

#! /bin/bash
#
# Johannes Meixner <jsmeix@suse.de>, 2008
#set -x
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
MY_NAME=${0##*/}
# Input:
# Create a temporary file:
TMP_DATA=$(mktemp -u /tmp/$MY_NAME.XXXXXX) || { echo "Error: Failed to make a temporary file /tmp/$MY_NAME.XXXXXX" 1>&2 ; exit 1 ; }
# Get the raw data:
egrep '^\[|^model[1-9]*|^scan-type|^usb-pid' | sed -e 's/^\[\(.*\)\]$/class=\1/' -e 's/ /_/g' -e 's/=/ /' >$TMP_DATA
# Output:
# Output header:
echo ':backend "hpaio"'
echo ':version "3.9.8"'
echo ':url "http://hplipopensource.com"'
echo ':comment "This backend is not included in SANE because it is included in the HPLIP software."'
echo ':devicetype :scanner'
echo ':mfg "Hewlett-Packard"'
echo ':url "http://www.hp.com/united-states/consumer/gateway/printing_multifunction.html"'
echo
# Add a generic entry (the "Any" with capital 'A' lets it appear at the top of YaST's sorted list):
# This USB ID ("0x03f0" "0x0000") is used as fallback by the YaST scanner autodetection
# via /usr/lib/YaST2/bin/autodetect_scanners which calls "hp-probe -busb -escan"
# because hp-probe does not show the USB ID. With this USB ID the generic entry matches
# to any autodetected HPLIP USB all-in-one device (the "-escan" excludes plain printers)
# so that the usually right driver (hpaio) can be preselected by YaST.
# Nevertheless, to be on the safe side, the support status is set to "untested".
echo ':model "Any all-in-one device"'
echo ':usbid "0x03f0" "0x0000"'
echo ':status :untested'
echo ':comment "fallback entry for HP all-in-one devices"'
echo
# Function to normalize model names:
Normalize()
{ MODELS=$( echo $MODELS | sed -e 's/hp_//ig' -e 's/Aii-in-One/all-in-one/ig' )
for w in LaserJet Mopier DeskJet Business Inkjet Officejet Photosmart PSC Printer Scanner Copier DJ CP CM MFP Apollo series Color all-in-one
do MODELS=$( echo $MODELS | sed -e "s/$w/$w/ig" )
done
}
# Function to output one model entry:
Output()
{ if [ "$TYPE" -gt "0" ]
then Normalize
UNIFIEDMODELS=$( echo $MODELS | tr ' ' '\n' | sort -u | tr '\n' ' ' )
ID=$(( "0x$ID" ))
for MODEL in $( echo $UNIFIEDMODELS )
do MODEL=$( echo $MODEL | sed -e "s/_/ /g" )
echo ":model \"$MODEL\""
if [ "$ID" -gt "0" ] ; then printf ":usbid \"0x03f0\" \"0x%.4x\"\n" $ID ; fi
echo ':status :good'
echo
done
fi
}
# Output model entries:
TYPE="0"
exec <$TMP_DATA
while read KEY VALUE
do case "$KEY" in
class) Output
ID="0"
TYPE="0"
MODELS="$VALUE" ;;
model*) MODELS=$( echo $MODELS $VALUE ) ;;
scan-type) TYPE="$VALUE" ;;
usb-pid) ID="$VALUE" ;;
*) echo "Ignoring key $KEY" 1>&2 ;;
esac
done
# Remove the temporary file
rm $TMP_DATA
exit 0