7.1.7. Scanner

Module to implement a scanner interface.

7.1.7.1. Reference

class BookBrowser.Scanner.FakeDevice[source]

Bases: object

__area_constraint__ = [(0, 14149222, 0), (0, 14149222, 0), (0, 19475988, 0), (0, 19475988, 0)]
__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

__mode_constraint__ = ['Color', 'Grayscale']
__resolution_constraint__ = [100, 200, 400]
__str__()[source]

Return str(self).

__x_max__ = 14149222
__y_max__ = 19475988
_logger = <Logger BookBrowser.Scanner.FakeDevice (WARNING)>
area
constraint(name)[source]
mode
model
resolution
vendor
class BookBrowser.Scanner.FakeScanner(device_hint='fake', release=True)[source]

Bases: BookBrowser.Scanner.Scanner

__fake_device__ = <BookBrowser.Scanner.FakeDevice object>
__init__(device_hint='fake', release=True)[source]

Initialize self. See help(type(self)) for accurate signature.

__scan_count__ = 0
_get_option(name)[source]
_get_option_constraint(name)[source]
_logger = <Logger BookBrowser.Scanner.FakeScanner (WARNING)>
_set_option(name, value)[source]
area
area_constraint
device
classmethod devices()[source]
classmethod exit()[source]
classmethod init()[source]
maximize_scan_area()[source]
mode
resolution
scan_image()[source]
exception BookBrowser.Scanner.FileExistsError[source]

Bases: NameError

class BookBrowser.Scanner.Scanner(device_hint='libusb', release=True)[source]

Bases: object

class to implement a scanner interface.

AREA_OPTIONS = ('tl-x', 'br-x', 'tl-y', 'br-y')

Scanning Area (x_inf, x_sup, y_inf, y_sup)

__bool__()[source]
__del__()[source]
__init__(device_hint='libusb', release=True)[source]

Initialize self. See help(type(self)) for accurate signature.

__initialised__ = False
_get_option(name)[source]
_get_option_constraint(name)[source]
_logger = <Logger BookBrowser.Scanner.Scanner (WARNING)>
_set_option(name, value)[source]
area
area_constraint
area_constraint_x_inf
area_constraint_x_sup
area_constraint_y_inf
area_constraint_y_sup
device
device_name
classmethod devices()[source]
classmethod exit()[source]
classmethod init()[source]
maximize_scan_area()[source]
mode
mode_constraint
resolution
resolution_constraint
scan(path, overwrite=False, index=None)[source]
scan_image()[source]
set_area_as_scale(x_inf, x_sup, y_inf, y_sup)[source]