add vulcan printer

Vulcan is the rack server I run for a university club
Giving every new member a receipt for joining was
unexpectedly popular :)
This commit is contained in:
Infinidoge 2024-12-07 11:33:01 -05:00
parent 4d4ad7c120
commit fe294ea493
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A

49
vulcan.py Executable file
View file

@ -0,0 +1,49 @@
#!/usr/bin/env python3
from printer import p
import sys
username, password, uid = sys.argv[1:]
uid = int(uid)
with p:
with p.set(
align="center",
bold=True,
invert=True,
smooth=True,
custom_size=True,
width=6,
height=6,
):
p.textln(" Vulcan ")
p.ln()
with p.set(align="center", double_height=True, double_width=True):
p.textln("The Hacker's Forge")
p.ln()
with p.vsplit() as v:
v.left(f"Username: {username}")
v.left(f"Password: {password}")
v.right("Hostname: vulcan.moe")
#v.right("SSH Ports: 22 & 4225")
p.ln()
p.textln("Please change your password as soon as possible.")
p.text("To do so, run ")
p.invert(" passwd ")
p.textln(" after SSHing in.")
p.ln()
p.textln("If SSH times out when trying to connect, use")
p.text(" the alt port (")
p.invert(" 4225 ")
p.textln(") instead.")
#p.ln()
#p.barcode(str(uid), "ITF", font="B")
with p.set(align="center"):
p.qr(str(uid), size=5, native=True)