mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2026-01-01 17:30:47 +00:00
Surveyed TODOs and style
This commit is contained in:
@@ -10,6 +10,9 @@ from reportlab.pdfbase.ttfonts import TTFont
|
||||
|
||||
from ptulsconv.docparser.adr_entity import ADRLine
|
||||
|
||||
#TODO: A Generic report useful for spotting
|
||||
#TODO: A report useful for M&E mixer's notes
|
||||
#TODO: Address all style notes this file
|
||||
|
||||
# This is from https://code.activestate.com/recipes/576832/ for
|
||||
# generating page count messages
|
||||
|
||||
@@ -11,7 +11,6 @@ from reportlab.platypus import Table, Paragraph
|
||||
from reportlab.lib.styles import getSampleStyleSheet
|
||||
|
||||
from .__init__ import time_format, make_doc_template
|
||||
from ..broadcast_timecode import TimecodeFormat
|
||||
from ..docparser.adr_entity import ADRLine
|
||||
|
||||
|
||||
@@ -53,8 +52,8 @@ def build_columns(lines: List[ADRLine], reel_list: Optional[List[str]], show_pri
|
||||
columns.append({
|
||||
'heading': n,
|
||||
'value_getter': lambda recs, n1=n: len([r for r in recs if r.reel == n1]),
|
||||
'value_getter2': lambda recs, n1=n: time_format(sum([r.time_budget_mins or 0. for r in recs
|
||||
if r.reel == n1])),
|
||||
'value_getter2': lambda recs, n1=n: time_format(sum([r.time_budget_mins or 0. for r
|
||||
in recs if r.reel == n1])),
|
||||
'style_getter': lambda col_index: [('ALIGN', (col_index, 0), (col_index, -1), 'CENTER'),
|
||||
('LINEAFTER', (col_index, 0), (col_index, -1), .5, colors.gray)],
|
||||
'width': num_column_width
|
||||
@@ -133,7 +132,8 @@ def build_columns(lines: List[ADRLine], reel_list: Optional[List[str]], show_pri
|
||||
return columns
|
||||
|
||||
|
||||
def populate_columns(lines: List[ADRLine], columns, include_omitted, page_size):
|
||||
def populate_columns(lines: List[ADRLine], columns, include_omitted, _page_size):
|
||||
# TODO: use page_size parameter
|
||||
data = list()
|
||||
styles = list()
|
||||
columns_widths = list()
|
||||
@@ -187,8 +187,8 @@ def populate_columns(lines: List[ADRLine], columns, include_omitted, page_size):
|
||||
return data, styles, columns_widths
|
||||
|
||||
|
||||
def build_header(column_widths):
|
||||
pass
|
||||
# def build_header(column_widths):
|
||||
# pass
|
||||
|
||||
|
||||
def output_report(lines: List[ADRLine], reel_list: List[str], include_omitted=False,
|
||||
@@ -210,8 +210,8 @@ def output_report(lines: List[ADRLine], reel_list: List[str], include_omitted=Fa
|
||||
record=lines[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)
|
||||
# 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)
|
||||
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
from reportlab.pdfgen.canvas import Canvas
|
||||
|
||||
from reportlab.pdfbase import pdfmetrics
|
||||
from reportlab.pdfbase.ttfonts import TTFont
|
||||
|
||||
from reportlab.lib.units import inch
|
||||
from reportlab.lib.pagesizes import letter
|
||||
|
||||
from reportlab.lib.styles import getSampleStyleSheet
|
||||
from reportlab.platypus import Paragraph
|
||||
|
||||
from .__init__ import GRect
|
||||
|
||||
import datetime
|
||||
|
||||
# TODO: Complete Recordist Log
|
||||
|
||||
def output_report(records):
|
||||
# order by start
|
||||
|
||||
@@ -229,7 +229,7 @@ def create_report_for_character(records, report_date, tc_display_format: Timecod
|
||||
# FIXME: Draw the title
|
||||
# TODO: Integrate this report into the common DocTemplate api
|
||||
|
||||
#draw_title_box(c, title_header_block, record)
|
||||
# draw_title_box(c, title_header_block, record)
|
||||
draw_character_row(c, char_row, record)
|
||||
draw_cue_number_block(c, cue_number_block, record)
|
||||
draw_timecode_block(c, timecode_block, record, tc_display_format=tc_display_format)
|
||||
|
||||
Reference in New Issue
Block a user