mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 08:50:48 +00:00
Document generation tweaks
This commit is contained in:
@@ -172,7 +172,7 @@ def output_report(records):
|
||||
page = page.inset(inch * 0.5)
|
||||
title_box, table_box = page.split_y(inch, 'd')
|
||||
|
||||
c = NumberedCanvas('Line Count.pdf', pagesize=(letter[1], letter[0]))
|
||||
c = NumberedCanvas('%s Line Count.pdf' % records['events'][0]['Title'], pagesize=(letter[1], letter[0]))
|
||||
c.setFont('Futura', 18.)
|
||||
c.drawCentredString(title_box.center_x, title_box.center_y, "Line Count")
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ def output_report(records):
|
||||
|
||||
lines = sorted(records['events'], key=lambda line: line['PT.Clip.Start_Seconds'])
|
||||
|
||||
doc = BaseDocTemplate("Summary.pdf",
|
||||
doc = BaseDocTemplate("%s Summary.pdf" % records['events'][0]['Title'],
|
||||
pagesize=page_size, leftMargin=0.5 * inch,
|
||||
rightMargin=0.5 * inch, topMargin=0.5 * inch,
|
||||
bottomMargin=0.5 * inch)
|
||||
|
||||
@@ -185,7 +185,7 @@ def draw_footer(canvas, rect, record, report_date, line_no, total_lines):
|
||||
|
||||
def create_report_for_character(records, report_date):
|
||||
|
||||
outfile = records[0]['CN'] + '_' + records[0]['Character Name'] + '.pdf'
|
||||
outfile = "%s_%s_%s_Log.pdf" % (records[0]['Title'], records[0]['Character Number'], records[0]['Character Name'],)
|
||||
assert outfile is not None
|
||||
assert outfile[-4:] == '.pdf', "Output file must have 'pdf' extension!"
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def output_report(records):
|
||||
|
||||
sorted(lines, key=lambda line: line['PT.Clip.Start_Seconds'])
|
||||
|
||||
doc = BaseDocTemplate("%s_%s_Script.pdf" % (n, lines[0]['Character Name']),
|
||||
doc = BaseDocTemplate("%s_%s_%s_Script.pdf" % (lines[0]['Title'], n, lines[0]['Character Name']),
|
||||
pagesize=letter, leftMargin=0.5 * inch,
|
||||
rightMargin=0.5 * inch, topMargin=0.5 * inch, bottomMargin=0.5 * inch)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user