Missing '!' meant the kernel couldn't recognize the interpreter
directive, causing ENOEXEC (errno 8) when executed directly, e.g.
via subprocess.run() from photobooth.py.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
-f only matches regular files, so it never matched the /dev/lp0 or
/dev/usb/lp0 character device nodes, leaving dev unset and always
failing. Use -e existence checks in proper if/elif priority order
(lp0 > usb/lp0 > stdout), with PRINTER_DEV as an unconditional override.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
writes raw bytes to /dev/lp0 (overridable via PRINTER_DEV): resets the
printer with ESC @, converts LF to CRLF to avoid staircasing on raw
device writes, then form-feeds to eject the page.
replaced the guvcview+keypress capture flow with a continuous
capture/convert/display loop so the terminal shows a live ascii
preview; pressing c saves the frame and triggers the new
txt2printr.sh hook (currently a blank template).