Initial commit

This commit is contained in:
2026-07-24 15:07:31 +05:00
commit 9b71b37dd0
8 changed files with 386 additions and 0 deletions

33
README.md Normal file
View File

@@ -0,0 +1,33 @@
# HP M1217 scanner
The scanner runs in an Alpine Linux container. Build the image and scan one
page from the flatbed with:
```sh
make scan
```
The resulting PDF is written to `scans/`. The command passes the current user
and group IDs to the container, so the PDF is owned by the invoking user.
Optional settings can be passed to `make`:
```sh
RESOLUTION=600 MODE=Gray make scan
```
Supported variables are `RESOLUTION`, `MODE`, `SCAN_SOURCE`, `SCAN_WIDTH`,
`SCAN_HEIGHT`, `JPEG_QUALITY`, `SCAN_TIMEOUT` (seconds), and `SANE_DEVICE`.
The default flatbed area is `215.9 × 297 mm`; override it when using a
different source or page size.
If an interrupted run leaves a container behind, the next `make scan` removes
that exact scan container before opening the USB device.
Remove the scanner container, Compose resources, and the built image with:
```sh
make clean
```
Scanned PDFs in `scans/` are preserved.