diff --git a/data analysis/scoutflex2019.py b/data analysis/scoutflex2019.py index 607b76fc..f5133d2f 100644 --- a/data analysis/scoutflex2019.py +++ b/data analysis/scoutflex2019.py @@ -5,7 +5,7 @@ Created on Wed Mar 20 12:21:31 2019 @author: creek """ -from google.cloud import firestore +from firebase_admin import firestore from google.oauth2 import service_account import pprint from pylatex import Document, Section, Subsection, Command @@ -40,14 +40,14 @@ def generate_team_report(team): doc.append("Average hatches: " + str(float(hatches)/count)) doc.append("Strategy Type: " + str(strategy)) doc.append("Strongest object in teleop: " + str(strongObject)) - - + + doc.preamble.append(Command('title', team.id)) doc.preamble.append(Command('author', 'Generated by Team 2022')) doc.preamble.append(Command('date', NoEscape(r'\today'))) doc.append(NoEscape(r'\maketitle')) - - doc.generate_pdf(filepath="C://Users//creek//Documents//" + str(team.id), clean_tex=False) + + doc.generate_pdf(filepath= str(team.id), clean_tex=False) credentials = service_account.Credentials.from_service_account_file('keys/firebasekey.json') @@ -57,4 +57,3 @@ teams = teams_ref.get() for team in teams: generate_team_report(team) -