Eh committing the example

This commit is contained in:
Jamie Hardt
2021-05-26 00:25:52 -07:00
parent b50d83c748
commit 52bbecb909
23 changed files with 8 additions and 6 deletions

View File

@@ -169,6 +169,7 @@ def create_adr_reports(parsed):
os.makedirs("Avid Markers", exist_ok=True)
os.chdir("Avid Markers")
output_avid_markers(lines)
os.chdir("..")
print_status_style("Creating Scripts directory and reports")
os.makedirs("Talent Scripts", exist_ok=True)

View File

@@ -50,11 +50,11 @@ class ADRDocTemplate(BaseDocTemplate):
BaseDocTemplate.build(self, flowables, filename, canvasmaker)
def make_doc_template(page_size, filename, document_title, record, document_header=""):
left_margin = right_margin = top_margin = bottom_margin = 0.5 * inch
def make_doc_template(page_size, filename, document_title, record, document_header="", left_margin=0.5 * inch):
right_margin = top_margin = bottom_margin = 0.5 * inch
page_box = GRect(0., 0., page_size[0], page_size[1])
_, page_box = page_box.split_x(left_margin, direction='r')
_, page_box = page_box.split_x(right_margin, direction='l')
_, page_box = page_box.split_x(left_margin, direction='l')
_, page_box = page_box.split_x(right_margin, direction='r')
_, page_box = page_box.split_y(bottom_margin, direction='u')
_, page_box = page_box.split_y(top_margin, direction='d')

View File

@@ -75,7 +75,7 @@ def build_story(lines):
]]
line_table = Table(data=line_table_data,
colWidths=[inch * 1., inch, inch * 3., 0.5 * inch, inch * 2.],
colWidths=[inch * 0.75, inch, inch * 3., 0.5 * inch, inch * 2.],
style=table_style)
if line.get('Scene', "[No Scene]") != this_scene:
@@ -127,7 +127,8 @@ def generate_report(page_size, lines, character_number=None, include_done=True,
filename = title + ".pdf"
doc = make_doc_template(page_size=page_size,
filename=filename, document_title=title,
record=lines[0], document_header=document_header)
record=lines[0], document_header=document_header,
left_margin=0.75 * inch)
story = build_story(lines)
doc.build(story)