report finesse

This commit is contained in:
Jamie Hardt
2021-05-25 12:23:20 -07:00
parent f5a80b3bdf
commit 2f037ad4db
2 changed files with 22 additions and 1 deletions

View File

@@ -186,9 +186,13 @@ def populate_columns(records, columns, include_omitted, page_size):
return data, styles, columns_widths
def build_header(column_widths):
pass
def output_report(records, include_omitted=False, page_size=portrait(letter)):
columns = build_columns(records, include_omitted)
data, style, columns_widths = populate_columns(records, columns, include_omitted, page_size)
style.append(('FONTNAME', (0, 0), (-1, -1), "Futura"))
style.append(('FONTSIZE', (0, 0), (-1, -1), 9.))
style.append(('LINEBELOW', (0, 0), (-1, 0), 1.0, colors.black))
@@ -203,6 +207,9 @@ def output_report(records, include_omitted=False, page_size=portrait(letter)):
record=records['events'][0],
document_header='Line Count')
#header_data, header_style, header_widths = build_header(columns_widths)
#header_table = Table(data=header_data, style=header_style, colWidths=header_widths)
table = Table(data=data, style=style, colWidths=columns_widths)
story = [table]

View File

@@ -74,8 +74,22 @@ def build_story(lines):
aux_data_field = build_aux_data_field(line)
tc_data = line['PT.Clip.Start'] + "<br />" + line['PT.Clip.Finish']
third_line = []
if 'Reel' in line.keys():
if line['Reel'][0:1] == 'R':
third_line.append("%s" % (line['Reel']))
else:
third_line.append("Reel %s" % (line['Reel']))
if 'Version' in line.keys():
third_line.append("(%s)" % line['Version'])
if len(third_line) > 0:
tc_data = tc_data + "<br/>" + " ".join(third_line)
line_table_data = [[Paragraph(cue_number_field, line_style),
Paragraph(line['PT.Clip.Start'] + "<br />" + line['PT.Clip.Finish'], line_style),
Paragraph(tc_data, line_style),
Paragraph(line['Line'], line_style),
Paragraph(time_data, line_style),
Paragraph(aux_data_field, line_style)