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:
parent
4d4ad7c120
commit
fe294ea493
1 changed files with 49 additions and 0 deletions
49
vulcan.py
Executable file
49
vulcan.py
Executable 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)
|
Loading…
Reference in a new issue