receipts/vulcan.py
Infinidoge fe294ea493
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 :)
2024-12-07 11:34:06 -05:00

49 lines
1.1 KiB
Python
Executable file

#!/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)