For making contact prints from a directory
- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- Remember the last 10 opened paths in ~/.config/contact-print/recent.txt (SMB passwords never stored) and offer them as one-click buttons. - Add a local-filesystem browse panel to the directory form. - Draw each filename directly below its image's actual bottom edge with a fixed 18 px gap, so landscape images no longer get a large gap. - Add a footer to every sheet: directory on the left (truncated if long), render date/time and page number on the right (never truncated). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
| internal | ||
| .gitignore | ||
| browse.go | ||
| go.mod | ||
| go.sum | ||
| history.go | ||
| main.go | ||
| print.go | ||
| README.md | ||
| web.go | ||
contact-print
A small localhost web app (lofigui) that builds printable A4 contact sheets from a directory of photos and sends them to a CUPS printer.
- Accepts a local path or an smb:// URL such as
smb://humphrey@hdtlserver.local/hdtl/Jobs/0050 Ada(built-in SMB client, password asked for once, kept only in memory). - Remembers the last 10 paths you opened (in
~/.config/contact-print/recent.txt, SMB passwords never stored) and shows them as one-click buttons, plus a simple file explorer for browsing to a local directory. - Lists only the root images (
IMG_2508.jpg,IMG_2518.jpg, …):.psdfiles and suffixed derivatives likeIMG_2508_base_80wide.jpgare hidden. - Select the images and a grid of 4, 6, 9 or 12 per page; each cell shows the filename in bold 14 pt text directly below the image's bottom edge, whatever its aspect ratio.
- Each sheet carries a footer with the source directory, the render date/time and the page number.
- Sheets are rendered server-side as A4 300 DPI PNGs, so the browser preview is pixel-identical to what prints.
- Print all pages (one CUPS job) or a single page via
lp.
Usage
go build .
./contact-print # open the printed URL, e.g. http://127.0.0.1:8090
Flags:
| Flag | Default | Purpose |
|---|---|---|
--printer |
H3_ET_2850 |
CUPS destination |
--print-hold |
off | submit jobs held, for paperless testing (lpstat -o, then cancel JOB or lp -i JOB -H resume) |
--port |
8090 |
first port to try (scans up to +9) |
Notes
- JPEG EXIF orientation is honoured.
- Thumbnails are cached in
~/.cache/contact-print/keyed by file size and mtime, so re-renders don't re-fetch images over SMB. - Supported source formats: jpg, jpeg, png, tif, tiff.