update archan's script

This commit is contained in:
Jacob Levine 2019-03-22 08:27:53 -05:00
parent bb5c38fbfe
commit 6f1cf1828a

View File

@ -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)