-
Notifications
You must be signed in to change notification settings - Fork 0
/
fll-generate-score-sheets.py
executable file
·50 lines (44 loc) · 1.9 KB
/
fll-generate-score-sheets.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 10 16:04:11 2019
@author: renfro
"""
import fll_sheet_utils
timeformat = '%-I:%M %p' # AM/PM with no leading zeros for hours
# Championship
#(buildingip, buildingrd, buildingcv) = ('Daniels Hall', 'Gym Basement',
# 'Henderson Hall')
#column_types = {'Pit': str, 'Team': int, 'Team Name': str,
# 'Time1': float, 'Table1': str,
# 'Time2': float, 'Table2': str,
# 'Time3': float, 'Table3': str,
# 'TimeIP': float, 'PlaceIP': str,
# 'TimeRD': float, 'PlaceRD': str,
# 'TimeCV': float, 'PlaceCV': str}
# Qualifier
(buildingip, buildingrd, buildingcv) = (None, None, None)
column_types = {'Pit': str, 'Team': int, 'Team Name': str,
'TimeIP': float, 'PlaceIP': str,
'TimeRD': float, 'PlaceRD': str,
'TimeCV': float, 'PlaceCV': str,
'TimePractice': float, 'TablePractice': str,
'Time1': float, 'Table1': str,
'Time2': float, 'Table2': str,
'Time3': float, 'Table3': str}
Debug = True
if Debug:
# schedule = 'fll-total-schedule.csv' # Championship
schedule = 'summertown-total-schedule.csv' # Qualifier
rg_template_path = 'city-shaper-score-sheet.pdf'
rubric_template_path = 'first-lego-league-rubrics.pdf'
team_template_path = 'team-template.docx'
else:
# Non-debugging paths:
(schedule, rg_template_path,
rubric_template_path, team_template_path) = fll_sheet_utils.parse_args()
data = fll_sheet_utils.read_csv(schedule, column_types)
fll_sheet_utils.make_referee_sheets(data, rg_template_path)
fll_sheet_utils.make_judge_sheets(data, rubric_template_path)
fll_sheet_utils.make_team_sheets(data, team_template_path, timeformat,
buildingip, buildingrd, buildingcv)