-
Notifications
You must be signed in to change notification settings - Fork 0
Adventures with Tanish
create a file called test.py
with the below contents:
import argparse
parser.add_argument("--sce", help="here is some help text for what this argument does")
args = parser.parse_args()
print(args)
print(args.sce)
- what does
python test.py -h
do? - what does
python test.py --sce hello
do?
add an argument called --printer-names
. it will take aprinter names that are separated by commas like
--printer-names=printer1,printer2
write code that parses args.printer_names, and returns a list of strings like ["printer1", "printer2"]
todo add evan snippets here, also --verbose
arg
todo evan add explanation beyond os.system(sleep 1)
after the above command finishes and is successful, delete the file
todo evan to explan beyond we send raw, also need 2 sided, copies and print range
Follow the below tutorial, make a separate api.
https://www.youtube.com/watch?v=x3bSuGH8R28&pp=ygUScHJvbWV0aGV1cyBmYXN0YXBp
After doing so discuss with Evan on what metrics we care about
Before doing so, install OpenVPN on your computer:
brew install --cask openvpn
Evan will make a file so you can connect to the SCE network to query the printer's metrics like:
- ink level
- pages printed
first we will just print a page as soon as we get it and be dumb
after the above works, we will push each request
todo evan will explain this
- recieve page
- save page locally to disk
- ensure snmp connection can be established to printers
- query printer for ink level
- send pages to printer with highest ink level
- delete file after print successful
- if we couldnt connect to either printer, dont do anything