-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
25 lines (22 loc) · 846 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python3
import printer
import utilities
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("-p", "--pixel_size", type=int, choices={1, 2, 4}, default=2)
parser.add_argument("-f", "--file_name")
# parser.add_argument("-q", "--quick_calibration", action="store_true")
parser.add_argument("-m", "--multi_color", action="store_true")
args = parser.parse_args()
if args.pixel_size == 1:
ptr = printer.Printer(utilities.PixelSize.PIXEL_1x1)
elif args.pixel_size == 2:
ptr = printer.Printer(utilities.PixelSize.PIXEL_2x2)
else:
ptr = printer.Printer(utilities.PixelSize.PIXEL_4x4)
# ptr.calibrate(args.quick_calibration)
if args.file_name:
ptr.draw(args.file_name, args.multi_color)
else:
ptr.draw()