-
Notifications
You must be signed in to change notification settings - Fork 29
/
main.py
30 lines (22 loc) · 845 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
26
27
28
29
30
from datetime import datetime, timedelta
from data.scoreboard_config import ScoreboardConfig
from renderer.main import MainRenderer
from rgbmatrix import RGBMatrix, RGBMatrixOptions
from utils import args, led_matrix_options
from data.data import Data
import debug
SCRIPT_NAME = "NFL Scoreboard"
SCRIPT_VERSION = "1.0.0"
# Get supplied command line arguments
args = args()
# Check for led configuration arguments
matrixOptions = led_matrix_options(args)
# Initialize the matrix
matrix = RGBMatrix(options = matrixOptions)
# Print some basic info on startup
debug.info("{} - v{} ({}x{})".format(SCRIPT_NAME, SCRIPT_VERSION, matrix.width, matrix.height))
# Read scoreboard options from config.json if it exists
config = ScoreboardConfig("config", args)
debug.set_debug_status(config)
data = Data(config)
MainRenderer(matrix, data).render()