From fe294ea493709a57be02e90a4e3c52b1b5515e80 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Sat, 7 Dec 2024 11:33:01 -0500 Subject: [PATCH] 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 :) --- vulcan.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 vulcan.py diff --git a/vulcan.py b/vulcan.py new file mode 100755 index 0000000..b4019d7 --- /dev/null +++ b/vulcan.py @@ -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)