feat(labelprint): 4x6 label print proxy on a Raspberry Pi
A Pi 3B+ (stickah.local) shares a Phomemo PM246 to the LAN as a plain CUPS queue, so any machine can print 4x6 labels -- fulfillr-site's shipping labels in particular -- without installing the vendor driver, which is x86-64 only. The role builds the TSPL CUPS driver from source instead. It is Debian, not Fedora, so it lives in its own inventory and playbook (make deploy-labelprint / check-labelprint) and the home.debyl.io roles can never run against it. make bootfs renders its cloud-init first-boot files onto a freshly imaged SD card from the same templates the role uses. The Wi-Fi credentials for the home and rescue networks are in the vault. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
be0d02b938
commit
6cd4d56de1
@@ -0,0 +1,25 @@
|
||||
# Cuts every media size except one out of a CUPS PPD.
|
||||
#
|
||||
# macOS and Windows add this printer driverless: they never see this PPD, they
|
||||
# see the IPP media-supported list cupsd derives from it. Trimming here is
|
||||
# therefore the only way to make 4x6 the single choice a client can offer --
|
||||
# there is no lpadmin option that restricts the media list.
|
||||
#
|
||||
# Regenerated from the driver's own PPD on every deploy, so a driver version
|
||||
# bump carries its new PPD through this filter rather than being pinned to a
|
||||
# fork.
|
||||
#
|
||||
# awk -v keep=w288h432 -f trim-ppd-media.awk tspl-label.ppd
|
||||
#
|
||||
# The four families below are keyed by the PPD page-size keyword in field 2,
|
||||
# which reads as "w288h432/4 x 6 in:" -- hence the split on "/".
|
||||
/^\*(PageSize|PageRegion|ImageableArea|PaperDimension) / {
|
||||
split($2, f, "/")
|
||||
if (f[1] != keep) next
|
||||
}
|
||||
|
||||
# Custom sizes would put "Manage Custom Sizes" back in the client's paper menu
|
||||
# and let a job arrive at any dimension, which is the thing being prevented.
|
||||
/^\*(CustomPageSize|ParamCustomPageSize|MaxMediaWidth|MaxMediaHeight)/ { next }
|
||||
|
||||
{ print }
|
||||
Reference in New Issue
Block a user