Initial commit
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
class DiscoveryProductionElementsLog
|
||||
attr_reader :video
|
||||
|
||||
def initialize(video)
|
||||
@video = video
|
||||
end
|
||||
|
||||
def to_xls
|
||||
build
|
||||
package.to_stream.read
|
||||
end
|
||||
|
||||
def filename(format = "xlsx")
|
||||
name = [video.file.filename.to_s, "production-elements-log"].map(&:parameterize).join("_")
|
||||
[name, format].join(".")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def talent_data
|
||||
@talent_data ||= data_for("TalentRelease")
|
||||
end
|
||||
|
||||
def appearance_data
|
||||
@appearance_data ||= data_for("AppearanceRelease")
|
||||
end
|
||||
|
||||
def location_data
|
||||
@location_data ||= data_for("LocationRelease")
|
||||
end
|
||||
|
||||
def acquired_media_data
|
||||
@acquired_media_data ||= data_for("AcquiredMediaRelease")
|
||||
end
|
||||
|
||||
def music_data
|
||||
@music_data ||= data_for("MusicRelease")
|
||||
end
|
||||
|
||||
def material_data
|
||||
@material_data ||= data_for("MaterialRelease")
|
||||
end
|
||||
|
||||
def data_for(release_type)
|
||||
video.
|
||||
video_release_confirmations.
|
||||
where(releasable_type: release_type).
|
||||
order(timecode_in: :asc).
|
||||
map { |confirmation| ReleasableDataAdapter.new(confirmation) }
|
||||
end
|
||||
|
||||
def build
|
||||
DiscoveryProductionElementsLogs::MediaRightsCertificationSheet.build(workbook)
|
||||
DiscoveryProductionElementsLogs::AcquiredFootageAndStillsSheet.build(workbook, acquired_media_data)
|
||||
DiscoveryProductionElementsLogs::MusicSheet.build(workbook, music_data)
|
||||
DiscoveryProductionElementsLogs::TalentSheet.build(workbook, talent_data)
|
||||
DiscoveryProductionElementsLogs::AppearanceSheet.build(workbook, appearance_data)
|
||||
DiscoveryProductionElementsLogs::LocationSheet.build(workbook, location_data)
|
||||
DiscoveryProductionElementsLogs::NameProductLogoSheet.build(workbook, material_data)
|
||||
DiscoveryProductionElementsLogs::ProductIntegrationSheet.build(workbook)
|
||||
end
|
||||
|
||||
def workbook
|
||||
@workbook ||= package.workbook
|
||||
end
|
||||
|
||||
def package
|
||||
@package ||= Axlsx::Package.new
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,104 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module DiscoveryProductionElementsLogs
|
||||
class AcquiredFootageAndStillsSheet < ::ExcelReports::Worksheet
|
||||
def title
|
||||
"Acquired Footage & Stills"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row ["ACQUIRED FOOTAGE/STILLS/ PUBLIC DOMAIN LOG (for all episodes/programs)"]
|
||||
sheet.add_row [instructions]
|
||||
sheet.add_row
|
||||
sheet.add_row table_headers
|
||||
sheet.add_row table_subheaders
|
||||
|
||||
data.each do |confirmation_data|
|
||||
sheet.add_row [
|
||||
confirmation_data.episode_number,
|
||||
confirmation_data.episode_title,
|
||||
confirmation_data.source_file_and_clip_names,
|
||||
confirmation_data.timecode_in,
|
||||
confirmation_data.timecode_out,
|
||||
confirmation_data.duration,
|
||||
confirmation_data.description,
|
||||
licensor_with_phone_number(confirmation_data),
|
||||
confirmation_data.applicable_media,
|
||||
confirmation_data.territory,
|
||||
confirmation_data.term,
|
||||
confirmation_data.restrictions,
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
cells_to_merge.each { |cell| sheet.merge_cells cell }
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "A1", Styles::BOLD, { sz: 14 }
|
||||
sheet.add_style "A2", { sz: 10 }
|
||||
sheet.add_style "A4:L4", Styles::TABLE_HEADER
|
||||
sheet.add_style "B5:L5", Styles::TABLE_HEADER
|
||||
sheet.add_style "A4", Styles::WRAP_TEXT
|
||||
sheet.add_style "L4", Styles::WRAP_TEXT
|
||||
|
||||
if data.any?
|
||||
sheet.add_style "A#{data_start_index}:L#{data_end_index}", Styles::TABLE_DATA
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def licensor_with_phone_number(confirmation)
|
||||
[
|
||||
confirmation.name,
|
||||
confirmation.confirmation.releasable.person_phone
|
||||
].reject(&:blank?)
|
||||
.join("\n")
|
||||
end
|
||||
|
||||
def data_start_index
|
||||
6
|
||||
end
|
||||
|
||||
def data_end_index
|
||||
(data_start_index + data.size) - 1
|
||||
end
|
||||
|
||||
def instructions
|
||||
<<~INSTRUCTIONS
|
||||
All licenses must conform to the DCI contractual requirements and must be fully executed.
|
||||
|
||||
Releases, licenses and agreements should only be logged once, based on the order of their appearance in the program.
|
||||
|
||||
If an image does not appear in the final Program, log that release after those in the final Program; indicate on the Log sheet “NOT IN FINAL PROGRAM” and list the camera tape only.
|
||||
|
||||
Refer to the source of all third party footage in the exact form as it appears on the release.
|
||||
|
||||
Please note that if it is not possible to deliver an English language agreement, an English language translation must accompany any agreement delivered in a foreign language (if applicable).
|
||||
INSTRUCTIONS
|
||||
end
|
||||
|
||||
def table_headers
|
||||
["EPISODE NUMBER", "EPISODE TITLE", "CLIP #", "PROGRAM MASTER TC", "", "TOTAL TIME", "BRIEF VIDEO DESCRIPTION", "LICENSOR\n(incl phone number)", "EXPLOITABLE RIGHTS", "", "", "DCL Rights Waiver Uploaded?"]
|
||||
end
|
||||
|
||||
def table_subheaders
|
||||
["", "", "", "IN", "OUT", "", "", "", "MEDIA", "TERRITORY", "TERM", ""]
|
||||
end
|
||||
|
||||
def column_widths
|
||||
[10, 20, 25, 15, 15, 15, 20, 15, 15, 15, 15, 10]
|
||||
end
|
||||
|
||||
def cells_to_merge
|
||||
%w(
|
||||
A1:M1 A2:M2 A4:A5 B4:B5 C4:C5 D4:E4 F4:F5 G4:G5 H4:H5 I4:K4 L4:L5
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,77 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module DiscoveryProductionElementsLogs
|
||||
class AppearanceSheet < ::ExcelReports::Worksheet
|
||||
def title
|
||||
"Appearance"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row ["APPEARANCE LOG (for all episodes/programs)", "", "", "", "", ""]
|
||||
sheet.add_row [instructions]
|
||||
sheet.add_row
|
||||
sheet.add_row ["EPISODE NUMBER(S) or LIST \"ALL\"", "EPISODE TITLE(S) or LIST \"ALL\"", "TIMECODE IN", "SOURCE TAPE / HARD DRIVE NUMBER", "NAME", "BRIEF VIDEO DESCRIPTION"]
|
||||
|
||||
data.each do |confirmation|
|
||||
sheet.add_row [
|
||||
confirmation.episode_number,
|
||||
confirmation.episode_title,
|
||||
confirmation.timecode_in,
|
||||
confirmation.source_file_and_clip_names,
|
||||
confirmation.name,
|
||||
confirmation.description
|
||||
]
|
||||
end
|
||||
|
||||
sheet.add_row
|
||||
sheet.add_row ["*On co-productions, releases & logs retained by Producer. Deliver upon request."]
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
cells_to_merge.each { |cell| sheet.merge_cells cell }
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "A1", Styles::BOLD, { sz: 14 }
|
||||
sheet.add_style "A2", sz: 9
|
||||
sheet.add_style "A4:F4", Styles::TABLE_HEADER
|
||||
|
||||
if data.any?
|
||||
sheet.add_style "A#{data_start_index}:F#{data_end_index}", Styles::TABLE_DATA
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def instructions
|
||||
<<~INSTRUCTIONS
|
||||
All licenses must conform to the DCI contractual requirements and must be fully executed.
|
||||
|
||||
Releases, licenses and agreements should only be logged once, based on the order of their appearance in the program.
|
||||
|
||||
If an image does not appear in the final Program, log that release after those in the final Program; indicate on the Log sheet “NOT IN FINAL PROGRAM” and list the camera tape only.
|
||||
|
||||
Please note that if it is not possible to deliver an English language agreement, an English language translation must accompany any agreement delivered in a foreign language (if applicable)."
|
||||
INSTRUCTIONS
|
||||
end
|
||||
|
||||
def data_start_index
|
||||
5
|
||||
end
|
||||
|
||||
def data_end_index
|
||||
(data_start_index + data.size) - 1
|
||||
end
|
||||
|
||||
def column_widths
|
||||
[20, 25, 20, 20, 25, 30]
|
||||
end
|
||||
|
||||
def cells_to_merge
|
||||
%w[ A2:F2 ]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,74 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module DiscoveryProductionElementsLogs
|
||||
class LocationSheet < ::ExcelReports::Worksheet
|
||||
def title
|
||||
"Location"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row ["LOCATION LOG (for all episodes/programs)"]
|
||||
sheet.add_row [instructions]
|
||||
sheet.add_row
|
||||
sheet.add_row table_headers
|
||||
|
||||
data.each do |confirmation|
|
||||
sheet.add_row [
|
||||
confirmation.episode_number,
|
||||
confirmation.episode_title,
|
||||
confirmation.timecode_in,
|
||||
confirmation.source_file_and_clip_names,
|
||||
[confirmation.name, confirmation.description].join(" ")
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "A1", Styles::BOLD, { sz: 14 }
|
||||
sheet.add_style "A2", { sz: 9 }
|
||||
sheet.add_style "A4:E4", Styles::TABLE_HEADER
|
||||
sheet.add_style "A4:B4", Styles::WRAP_TEXT
|
||||
sheet.add_style "D4", Styles::WRAP_TEXT
|
||||
|
||||
if data.any?
|
||||
sheet.add_style "A#{data_start_index}:E#{data_end_index}", Styles::TABLE_DATA
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def instructions
|
||||
<<~INSTRUCTIONS
|
||||
All licenses must conform to the DCI contractual requirements and must be fully executed.
|
||||
|
||||
Releases, licenses and agreements should only be logged once, based on the order of their appearance in the program.
|
||||
|
||||
If an image does not appear in the final Program, log that release after those in the final Program; indicate on the Log sheet "NOT IN FINAL PROGRAM" and list the camera tape only.
|
||||
|
||||
Please note that if it is not possible to deliver an English language agreement, an English language translation must accompany any agreement delivered in a foreign language (if applicable).
|
||||
INSTRUCTIONS
|
||||
end
|
||||
|
||||
def table_headers
|
||||
["EPISODE NUMBER(S) or LIST \"ALL\"", "EPISODE TITLE(S) or LIST \"ALL\"", "TIMECODE IN", "SOURCE TAPE / HARD DRIVE NUMBER", "LOCATION NAME and BRIEF VIDEO DESCRIPTION"]
|
||||
end
|
||||
|
||||
def column_widths
|
||||
[20, 20, 15, 20, 40]
|
||||
end
|
||||
|
||||
def data_start_index
|
||||
5
|
||||
end
|
||||
|
||||
def data_end_index
|
||||
(data_start_index + data.size) - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,61 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module DiscoveryProductionElementsLogs
|
||||
class MediaRightsCertificationSheet < ::ExcelReports::Worksheet
|
||||
def title
|
||||
"Media Rights Certification"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row ["MEDIA RIGHTS CERTIFICATION (Required for final payment)", "", "", "", "", "", "", "", "", ""]
|
||||
sheet.add_row ["By uploading this file I certify that:"]
|
||||
sheet.add_row ["1) Check one"]
|
||||
sheet.add_row ["", "Rights waivers have been submitted and approved by DCL for all Program elements with any restriction or limitation not permitted by the Programming Agreement (including, without limitation, all music, footage, photographic stills, graphics, talent, and releases)."]
|
||||
sheet.add_row ["", "OR"]
|
||||
sheet.add_row ["", "No rights waivers are required because all the Program elements are fully cleared or subject only to the restrictions or limitations permitted by the Programming Agreement."]
|
||||
sheet.add_row ["AND"]
|
||||
sheet.add_row ["2) Check one\n\nIn the event the Programming Agreement permits that third-party stills or stock footage can be licensed with certain term or media restrictions (e.g., 10 year license or no theatrical rights or US standard television rights), it is further certified that this Program (check one):"]
|
||||
sheet.add_row ["", "Does contain third-party stills or stock footage secured subject to those restrictions."]
|
||||
sheet.add_row ["", "OR"]
|
||||
sheet.add_row ["", "Does not contain third-party stills or stock footage secured subject to those restrictions."]
|
||||
sheet.add_row ["", "OR"]
|
||||
sheet.add_row ["", "This Program does NOT contain any third-party stills or stock footage."]
|
||||
sheet.add_row ["Submitted By _____________________________"]
|
||||
sheet.add_row ["Uploading this document to the Producer’s Portal constitutes electronic signature"]
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
cells_to_merge.each { |cell| sheet.merge_cells cell }
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "A1", { sz: 18 }, Styles::BOLD, Styles::UNDERLINE
|
||||
sheet.add_style "A2", { sz: 16 }, Styles::BOLD
|
||||
sheet.add_style "A2", { sz: 12 }, Styles::BOLD
|
||||
sheet.add_style "A7", { sz: 12 }, Styles::BOLD
|
||||
sheet.add_style "A14", { sz: 12 }, Styles::BOLD
|
||||
sheet.add_style "A15", { sz: 12 }, Styles::ITALIC, Styles::BOLD, Styles::COLOR_RED
|
||||
sheet.add_style "B5", Styles::COLOR_BLUE
|
||||
sheet.add_style "B10", Styles::COLOR_BLUE
|
||||
sheet.add_style "B12", Styles::COLOR_BLUE
|
||||
sheet.add_style "A8", Styles::WRAP_TEXT
|
||||
sheet.add_style "B4", Styles::WRAP_TEXT
|
||||
sheet.add_style "B6", Styles::WRAP_TEXT
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def column_widths
|
||||
[10, 20, 10, 10, 10, 10, 10, 10, 10, 10]
|
||||
end
|
||||
|
||||
def cells_to_merge
|
||||
%w[
|
||||
A1:J1 A2:J2 A3:J3 B4:J4 B5:J5 B6:J6 A8:J8 B9:J9 B10:J10 B11:J11 B12:J12 B13:J13 A14:J14 A15:J15
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,67 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module DiscoveryProductionElementsLogs
|
||||
class MusicSheet < ::ExcelReports::Worksheet
|
||||
def title
|
||||
"Music"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row ["MUSIC LOG (for all episodes/programs) for commissioned work-for-hire music only"]
|
||||
sheet.add_row ["Not applicable if program contains 100% library"]
|
||||
sheet.add_row ["Episode Title(s) or list \"All\"", "TRACK TITLE", "COMPOSER", "PUBLISHER"]
|
||||
|
||||
data.each do |confirmation_data|
|
||||
sheet.add_row [
|
||||
confirmation_data.episode_title,
|
||||
confirmation_data.source_file_name,
|
||||
composers(confirmation_data),
|
||||
publishers(confirmation_data),
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "A1", Styles::BOLD, { sz: 14 }
|
||||
sheet.add_style "A2", { sz: 14 }
|
||||
sheet.add_style "A3:D3", Styles::TABLE_HEADER
|
||||
sheet.add_style "A3", Styles::WRAP_TEXT
|
||||
|
||||
if has_data?
|
||||
sheet.add_style "A#{data_start_index}:D#{data_end_index}", Styles::TABLE_DATA
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def column_widths
|
||||
[20, 20, 30, 60]
|
||||
end
|
||||
|
||||
def has_data?
|
||||
data.any?
|
||||
end
|
||||
|
||||
def data_start_index
|
||||
4
|
||||
end
|
||||
|
||||
def data_end_index
|
||||
(data_start_index + data.size) - 1
|
||||
end
|
||||
|
||||
def composers(confirmation_data)
|
||||
confirmation_data.confirmation.composer_info.split("|").join("\n")
|
||||
end
|
||||
|
||||
def publishers(confirmation_data)
|
||||
confirmation_data.confirmation.publisher_info.split("|").join("\n")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,74 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module DiscoveryProductionElementsLogs
|
||||
class NameProductLogoSheet < ::ExcelReports::Worksheet
|
||||
def title
|
||||
"Name Product Logo"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row ["NAME/PRODUCT/LOGO LOG (for all episodes/programs)"]
|
||||
sheet.add_row [instructions]
|
||||
sheet.add_row
|
||||
sheet.add_row table_headers
|
||||
|
||||
data.each do |confirmation|
|
||||
sheet.add_row [
|
||||
confirmation.episode_number,
|
||||
confirmation.episode_title,
|
||||
confirmation.timecode_in,
|
||||
confirmation.source_file_and_clip_names,
|
||||
confirmation.name
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "A1", Styles::BOLD, { sz: 14 }
|
||||
sheet.add_style "A2", { sz: 9 }
|
||||
sheet.add_style "A4:E4", Styles::TABLE_HEADER
|
||||
sheet.add_style "A4:B4", Styles::WRAP_TEXT
|
||||
sheet.add_style "D4", Styles::WRAP_TEXT
|
||||
|
||||
if data.any?
|
||||
sheet.add_style "A#{data_start_index}:E#{data_end_index}", Styles::TABLE_DATA
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def instructions
|
||||
<<~INSTRUCTIONS
|
||||
All licenses must conform to the DCI contractual requirements and must be fully executed.
|
||||
|
||||
Releases, licenses and agreements should only be logged once, based on the order of their appearance in the program.
|
||||
|
||||
If an image does not appear in the final Program, log that release after those in the final Program; indicate on the Log sheet "NOT IN FINAL PROGRAM" and list the camera tape only.
|
||||
|
||||
Please note that if it is not possible to deliver an English language agreement, an English language translation must accompany any agreement delivered in a foreign language (if applicable).
|
||||
INSTRUCTIONS
|
||||
end
|
||||
|
||||
def table_headers
|
||||
["EPISODE NUMBER(S) or LIST \"ALL\"", "EPISODE TITLE(S) or LIST \"ALL\"", "TIMECODE IN", "SOURCE TAPE / HARD DRIVE NUMBER", "PRODUCT/LOGO NAME"]
|
||||
end
|
||||
|
||||
def column_widths
|
||||
[15, 25, 15, 20, 40]
|
||||
end
|
||||
|
||||
def data_start_index
|
||||
5
|
||||
end
|
||||
|
||||
def data_end_index
|
||||
(data_start_index + data.size) - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,56 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module DiscoveryProductionElementsLogs
|
||||
class ProductIntegrationSheet < ::ExcelReports::Worksheet
|
||||
def title
|
||||
"Product Integration"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row ["Product Integration / Trade-Out Log"]
|
||||
sheet.add_row [instructions]
|
||||
sheet.add_row
|
||||
sheet.add_row table_headers
|
||||
sheet.add_row table_headers2
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
cells_to_merge.each { |cell| sheet.merge_cells cell }
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "A1", Styles::BOLD, { sz: 14 }
|
||||
sheet.add_style "A2", Styles::BOLD, { sz: 12 }
|
||||
sheet.add_style "A4:J4", Styles::TABLE_HEADER
|
||||
sheet.add_style "A5:J5", Styles::TABLE_HEADER
|
||||
sheet.add_style "A4:J4", Styles::WRAP_TEXT
|
||||
sheet.add_style "A5:J5", Styles::WRAP_TEXT
|
||||
sheet.add_style "I4:J4", Styles::BG_YELLOW
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def instructions
|
||||
"All contract agreements with companies providing trade-outs must be uploaded to the Producer's Portal"
|
||||
end
|
||||
|
||||
def table_headers
|
||||
["EPISODE #\nTitle\n(if applicable)", "PRODUCT ITEM(S)\n(ex: free airfare)", "COMPANY PROVIDING TRADE-OUT\n(ex: United Airlines)", "PRODUCT VALUE", "BUDGETED VALUE\nItem & Category in production budget", "OBLIGATIONS\n(ex: \"thanks to\" credit)", "AGREEMENT WITH COMPANY EXECUTION DATE", "DATE APPROVED BY DCI", "SELECT \"A\" OR \"B\"", ""]
|
||||
end
|
||||
|
||||
def table_headers2
|
||||
["", "", "", "", "", "", "", "", "A\nTrade will be savings to program List amount", "B\nTrade will be added value to program List amount"]
|
||||
end
|
||||
|
||||
def column_widths
|
||||
[15, 15, 15, 15, 15, 15, 15, 15, 15, 15]
|
||||
end
|
||||
|
||||
def cells_to_merge
|
||||
%w[ A4:A5 B4:B5 C4:C5 D4:D5 E4:E5 F4:F5 G4:G5 H4:H5 I4:J4 ]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,49 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module DiscoveryProductionElementsLogs
|
||||
class TalentSheet < ::ExcelReports::Worksheet
|
||||
def title
|
||||
"Talent"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row ["TALENT AGREEMENT LOG (for all episodes/programs)"]
|
||||
sheet.add_row
|
||||
sheet.add_row ["Episode Number(s) or list \"All\"", "Episode Title(s) or list \"All\"", "SERVICES", "NAME/COMPANY"]
|
||||
|
||||
data.each do |confirmation|
|
||||
sheet.add_row [confirmation.episode_number, confirmation.episode_title, "", confirmation.name]
|
||||
end
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "A1", Styles::BOLD, { sz: 14 }
|
||||
sheet.add_style "A3:D3", Styles::TABLE_HEADER
|
||||
sheet.add_style "A3", Styles::WRAP_TEXT
|
||||
|
||||
if data.any?
|
||||
sheet.add_style "A#{data_start_index}:D#{data_end_index}", Styles::TABLE_DATA
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def column_widths
|
||||
[20, 20, 30, 60]
|
||||
end
|
||||
|
||||
def data_start_index
|
||||
4
|
||||
end
|
||||
|
||||
def data_end_index
|
||||
(data_start_index + data.size) - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,61 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
class NatGeoLegalBinderLog
|
||||
attr_reader :video
|
||||
|
||||
def initialize(video)
|
||||
@video = video
|
||||
end
|
||||
|
||||
def to_xls
|
||||
build
|
||||
package.to_stream.read
|
||||
end
|
||||
|
||||
def filename
|
||||
name = [video.file.filename.to_s, "legal-binder-log"].map(&:parameterize).join("_")
|
||||
[name, "xlsx"].join(".")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def appearance_data
|
||||
@appearance_data ||= data_for("AppearanceRelease")
|
||||
end
|
||||
|
||||
def location_data
|
||||
@location_data ||= data_for("LocationRelease")
|
||||
end
|
||||
|
||||
def acquired_media_data
|
||||
@acquired_media_data ||= data_for("AcquiredMediaRelease")
|
||||
end
|
||||
|
||||
def data_for(release_type)
|
||||
video.
|
||||
video_release_confirmations.
|
||||
where(releasable_type: release_type).
|
||||
order(timecode_in: :asc).
|
||||
map { |confirmation| ExcelReports::VideoReports::ReleasableDataAdapter.new(confirmation) }
|
||||
end
|
||||
|
||||
|
||||
def build
|
||||
NatGeoLegalBinderLogs::LegalBinderChecklistSheet.build(workbook, [], video)
|
||||
NatGeoLegalBinderLogs::AppearanceReleaseLogSheet.build(workbook, appearance_data)
|
||||
NatGeoLegalBinderLogs::LocationReleaseLogSheet.build(workbook, location_data)
|
||||
NatGeoLegalBinderLogs::AcquiredFootageLogSheet.build(workbook, acquired_media_data)
|
||||
NatGeoLegalBinderLogs::ThirdPartyContractLogSheet.build(workbook, [])
|
||||
NatGeoLegalBinderLogs::ProductionPersonnelLogSheet.build(workbook, [])
|
||||
end
|
||||
|
||||
def workbook
|
||||
@workbook ||= package.workbook
|
||||
end
|
||||
|
||||
def package
|
||||
@package ||= Axlsx::Package.new
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,78 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module NatGeoLegalBinderLogs
|
||||
class AcquiredFootageLogSheet < Worksheet
|
||||
def title
|
||||
"Acquired Footage-Stills Log"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row
|
||||
sheet.add_row
|
||||
sheet.add_row(["", "", "", "", "", "RIGHTS OBTAINED", "", "", ""])
|
||||
sheet.add_row(table_headers)
|
||||
|
||||
data.each_with_index do |confirmation, index|
|
||||
sheet.add_row [
|
||||
index + 1,
|
||||
confirmation.description,
|
||||
confirmation.timecode_in,
|
||||
confirmation.timecode_out,
|
||||
[confirmation.name, confirmation.contact_address].join("\n"),
|
||||
confirmation.applicable_media,
|
||||
confirmation.territory,
|
||||
confirmation.term,
|
||||
confirmation.restrictions,
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
cells_to_merge.each { |cell| sheet.merge_cells cell }
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "F3", Styles::BOLD, Styles::FULLY_CENTERED, Styles::BG_GRAY, Styles::THIN_BLACK_BORDER
|
||||
sheet.add_style "A4:I4", Styles::BOLD, Styles::FULLY_CENTERED, Styles::THIN_BLACK_BORDER, Styles::WRAP_TEXT
|
||||
|
||||
if data.any?
|
||||
sheet.add_style "A#{data_start_index}:I#{data_end_index}", Styles::THIN_BLACK_BORDER
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def table_headers
|
||||
[
|
||||
"Contract Number",
|
||||
"Brief description of footage or stills",
|
||||
"Program Master Timecode IN",
|
||||
"Program Master Timecode OUT",
|
||||
"Vendor Name and Contact Information",
|
||||
"Media",
|
||||
"Territory",
|
||||
"Term",
|
||||
"Restrictions",
|
||||
]
|
||||
end
|
||||
|
||||
def data_start_index
|
||||
5
|
||||
end
|
||||
|
||||
def data_end_index
|
||||
(data_start_index + data.size) - 1
|
||||
end
|
||||
|
||||
def column_widths
|
||||
[12, 25, 22, 22, 28, 18, 22, 22, 25]
|
||||
end
|
||||
|
||||
def cells_to_merge
|
||||
%w(F3:I3)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,82 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module NatGeoLegalBinderLogs
|
||||
class AppearanceReleaseLogSheet < Worksheet
|
||||
def title
|
||||
"Appearance Release Log"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
instructions1 = "PLEASE ARRANGE CONTRACTS IN ORDER OF FIRST APPEARANCE IN FINAL PROGRAM."
|
||||
instructions2 = "PLEASE INCLUDE ALL CONTRACTS SECURED FOR THE PROGRAM INCLUDING THOSE FOR ALL DIGITAL SOCIAL CONTENT."
|
||||
instructions3 = "IF INDIVIDUAL DID NOT APPEAR IN THE FINAL SHOW, PLEASE INDICATE \"NOT IN FINAL PROGRAM\" UNDER TIME CODE COLUMN & LIST ALPHABETICALLY."
|
||||
|
||||
sheet.add_row([instructions1])
|
||||
sheet.add_row([instructions2])
|
||||
sheet.add_row([instructions3])
|
||||
sheet.add_row
|
||||
sheet.add_row(["", "", "", "RIGHTS OBTAINED", "", "", "", "", ""])
|
||||
sheet.add_row(table_headers)
|
||||
|
||||
data.each_with_index do |confirmation, index|
|
||||
sheet.add_row [
|
||||
index + 1,
|
||||
confirmation.timecode_in,
|
||||
[confirmation.name, confirmation.contact_address].join("\n"),
|
||||
confirmation.applicable_media,
|
||||
confirmation.territory,
|
||||
confirmation.term,
|
||||
"",
|
||||
confirmation.restrictions,
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
cells_to_merge.each { |cell| sheet.merge_cells cell }
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "D5", Styles::BOLD, Styles::FULLY_CENTERED, Styles::BG_GRAY, Styles::THIN_BLACK_BORDER
|
||||
sheet.add_style "A6:H6", Styles::BOLD, Styles::FULLY_CENTERED, Styles::THIN_BLACK_BORDER, Styles::WRAP_TEXT
|
||||
|
||||
if data.any?
|
||||
sheet.add_style "A#{data_start_index}:H#{data_end_index}", Styles::THIN_BLACK_BORDER
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def table_headers
|
||||
[
|
||||
"Contract Number",
|
||||
"Program Master Timecode",
|
||||
"Person's Name and Contact Information",
|
||||
"Media",
|
||||
"Territory",
|
||||
"Term",
|
||||
"Program Specific Y/N",
|
||||
"Restrictions"
|
||||
]
|
||||
end
|
||||
|
||||
def data_start_index
|
||||
7
|
||||
end
|
||||
|
||||
def data_end_index
|
||||
(data_start_index + data.size) - 1
|
||||
end
|
||||
|
||||
def column_widths
|
||||
[12, 25, 30, 30, 30, 30, 15, 30]
|
||||
end
|
||||
|
||||
def cells_to_merge
|
||||
%w(A1:F1 A2:F2 A3:F3 D5:H5)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,50 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module NatGeoLegalBinderLogs
|
||||
class LegalBinderChecklistSheet < Worksheet
|
||||
def title
|
||||
"Legal Binder Checklist"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row ["SERIES TITLE:", ""]
|
||||
sheet.add_row ["EPISODE NUMBER:", header_data.number]
|
||||
sheet.add_row ["EPISODE TITLE:", header_data.name]
|
||||
sheet.add_row
|
||||
sheet.add_row
|
||||
sheet.add_row ["", "INCLUDED", "PENDING", "N/A", "COMMENTS"]
|
||||
sheet.add_row ["COPY OF CREDIT LIST", "", "", "", ""]
|
||||
sheet.add_row ["COPY OF MUSIC CUE SHEET", "", "", "", ""]
|
||||
sheet.add_row ["COPY OF E&O CERTIFICATE", "", "", "", ""]
|
||||
sheet.add_row ["APPEARANCE RELEASES + LOG", "", "", "", ""]
|
||||
sheet.add_row ["LOCATION RELEASES/PERMITS + LOG", "", "", "", ""]
|
||||
sheet.add_row ["ACQUIRED FOOTAGE/STILLS CONTRACTS + LOG", "", "", "", ""]
|
||||
sheet.add_row ["THIRD PARTY CONTRACTS (GRAPHICS, COMPOSER, MUSIC LIBRARY, NARRATOR, TALENT) + LOG", "", "", "", ""]
|
||||
sheet.add_row ["PRODUCTION PERSONNEL LOG", "", "", "", ""]
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
cells_to_merge.each { |cell| sheet.merge_cells cell }
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "A1:A3", Styles::BOLD, { sz: 14 }
|
||||
sheet.add_style "B6:E6", Styles::BOLD, Styles::THIN_BLACK_BORDER, Styles::FULLY_CENTERED, { sz: 10 }
|
||||
sheet.add_style "A7:A14", Styles::BOLD, Styles::THIN_BLACK_BORDER, Styles::WRAP_TEXT, { sz: 10 }
|
||||
sheet.add_style "B7:E14", Styles::THIN_BLACK_BORDER
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def column_widths
|
||||
[30, 12, 12, 10, 25]
|
||||
end
|
||||
|
||||
def cells_to_merge
|
||||
%w(B1:D1 B2:D2 B3:D3)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,84 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module NatGeoLegalBinderLogs
|
||||
class LocationReleaseLogSheet < Worksheet
|
||||
def title
|
||||
"Location Release Log"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
instructions1 = "PLEASE ARRANGE CONTRACTS IN ORDER OF FIRST APPEARANCE IN FINAL PROGRAM."
|
||||
instructions2 = "PLEASE INCLUDE ALL CONTRACTS SECURED FOR THE PROGRAM INCLUDING THOSE FOR ALL DIGITAL SOCIAL CONTENT."
|
||||
instructions3 = "IF INDIVIDUAL DID NOT APPEAR IN THE FINAL SHOW, PLEASE INDICATE \"NOT IN FINAL PROGRAM\" UNDER TIME CODE COLUMN & LIST ALPHABETICALLY."
|
||||
|
||||
sheet.add_row([instructions1])
|
||||
sheet.add_row([instructions2])
|
||||
sheet.add_row([instructions3])
|
||||
sheet.add_row
|
||||
sheet.add_row(["", "", "", "RIGHTS OBTAINED", "", "", "", "", ""])
|
||||
sheet.add_row(table_headers)
|
||||
|
||||
data.each_with_index do |confirmation, index|
|
||||
sheet.add_row [
|
||||
index + 1,
|
||||
confirmation.timecode_in,
|
||||
[confirmation.name, confirmation.confirmation.releasable.address].join("\n"),
|
||||
"",
|
||||
confirmation.applicable_media,
|
||||
confirmation.territory,
|
||||
confirmation.term,
|
||||
"",
|
||||
confirmation.restrictions,
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
cells_to_merge.each { |cell| sheet.merge_cells cell }
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "D5", Styles::BOLD, Styles::FULLY_CENTERED, Styles::BG_GRAY, Styles::THIN_BLACK_BORDER
|
||||
sheet.add_style "A6:I6", Styles::BOLD, Styles::FULLY_CENTERED, Styles::THIN_BLACK_BORDER, Styles::WRAP_TEXT
|
||||
|
||||
if data.any?
|
||||
sheet.add_style "A#{data_start_index}:I#{data_end_index}", Styles::THIN_BLACK_BORDER
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def table_headers
|
||||
[
|
||||
"Contract Number",
|
||||
"Program Master Timecode",
|
||||
"Location's Name and Contact Information",
|
||||
"Permit and/or Location Cost",
|
||||
"Media",
|
||||
"Territory",
|
||||
"Term",
|
||||
"Program Specific Y/N",
|
||||
"Restrictions"
|
||||
]
|
||||
end
|
||||
|
||||
def data_start_index
|
||||
7
|
||||
end
|
||||
|
||||
def data_end_index
|
||||
(data_start_index + data.size) - 1
|
||||
end
|
||||
|
||||
def column_widths
|
||||
[12, 25, 35, 35, 30, 30, 30, 15, 30]
|
||||
end
|
||||
|
||||
def cells_to_merge
|
||||
%w(A1:F1 A2:F2 A3:F3 D5:I5)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,50 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module NatGeoLegalBinderLogs
|
||||
class ProductionPersonnelLogSheet < Worksheet
|
||||
def title
|
||||
"Production Personnel Log"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row
|
||||
sheet.add_row
|
||||
sheet.add_row(table_headers)
|
||||
sheet.add_row(["Producer", "", "", ""])
|
||||
sheet.add_row(["Director", "", "", ""])
|
||||
sheet.add_row(["Writer", "", "", ""])
|
||||
sheet.add_row(["Editor", "", "", ""])
|
||||
sheet.add_row(["Assistant Producer", "", "", ""])
|
||||
sheet.add_row(["Production Manager", "", "", ""])
|
||||
sheet.add_row(["Camera", "", "", ""])
|
||||
sheet.add_row(["Audio", "", "", ""])
|
||||
sheet.add_row(["Local Coordinator/Location Manager", "", "", ""])
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "A3:D3", Styles::BOLD, Styles::FULLY_CENTERED, Styles::THIN_BLACK_BORDER
|
||||
sheet.add_style "A4:D12", Styles::FULLY_CENTERED, Styles::THIN_BLACK_BORDER, Styles::WRAP_TEXT
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def table_headers
|
||||
[
|
||||
"Title",
|
||||
"Name",
|
||||
"Company",
|
||||
"Contact Info (Address/Email/Phone)",
|
||||
]
|
||||
end
|
||||
|
||||
def column_widths
|
||||
[30, 30, 35, 35]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,61 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
module NatGeoLegalBinderLogs
|
||||
class ThirdPartyContractLogSheet < Worksheet
|
||||
def title
|
||||
"Third Party Contract Log"
|
||||
end
|
||||
|
||||
def fill_content(sheet)
|
||||
sheet.add_row
|
||||
sheet.add_row
|
||||
sheet.add_row(["", "", "RIGHTS OBTAINED", "", "", "", ""])
|
||||
sheet.add_row(table_headers)
|
||||
sheet.add_row(["Graphics", "", "", "", "", "", ""])
|
||||
sheet.add_row(["Composer", "", "", "", "", "", ""])
|
||||
sheet.add_row(["Music Library", "", "", "", "", "", ""])
|
||||
sheet.add_row(["Narrator", "", "", "", "", "", ""])
|
||||
sheet.add_row(["Talent", "", "", "", "", "", ""])
|
||||
sheet.add_row(["Equipment and/or Vehicle Rental (only applicable if equipment/vehicle appears on camera and contract contains rights language)", "", "", "", "", "", ""])
|
||||
sheet.add_row(["Production Facility (only applicable if contract contains rights language)", "", "", "", "", "", ""])
|
||||
sheet.add_row(["Post Production Facility (only applicable if contract contains rights language)", "", "", "", "", "", ""])
|
||||
sheet.add_row(["Other Facilities (only applicable if contract contains rights language)", "", "", "", "", "", ""])
|
||||
end
|
||||
|
||||
def format(sheet)
|
||||
sheet.column_widths *column_widths
|
||||
cells_to_merge.each { |cell| sheet.merge_cells cell }
|
||||
end
|
||||
|
||||
def style(sheet)
|
||||
sheet.add_style "C3", Styles::BOLD, Styles::FULLY_CENTERED, Styles::BG_GRAY, Styles::THIN_BLACK_BORDER
|
||||
sheet.add_style "A4:G4", Styles::BOLD, Styles::FULLY_CENTERED, Styles::THIN_BLACK_BORDER
|
||||
sheet.add_style "A5:A13", Styles::FULLY_CENTERED, Styles::THIN_BLACK_BORDER, Styles::WRAP_TEXT
|
||||
sheet.add_style "B5:G13", Styles::FULLY_CENTERED, Styles::THIN_BLACK_BORDER
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def table_headers
|
||||
[
|
||||
"Brief Description of Services",
|
||||
"3rd Party Name and Contact Information",
|
||||
"Media",
|
||||
"Territory",
|
||||
"Term",
|
||||
"Program Specific Y/N",
|
||||
"Restrictions",
|
||||
]
|
||||
end
|
||||
|
||||
def column_widths
|
||||
[25, 30, 20, 20, 20, 15, 20]
|
||||
end
|
||||
|
||||
def cells_to_merge
|
||||
%w(C3:G3)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,73 @@
|
||||
module ExcelReports
|
||||
module VideoReports
|
||||
class ReleasableDataAdapter
|
||||
attr_reader :confirmation
|
||||
|
||||
delegate :video, to: :confirmation
|
||||
|
||||
def initialize(release_confirmation)
|
||||
@confirmation = release_confirmation
|
||||
end
|
||||
|
||||
def description
|
||||
confirmation.description || confirmation.video.project.description
|
||||
end
|
||||
|
||||
def episode_number
|
||||
video.number
|
||||
end
|
||||
|
||||
def episode_title
|
||||
video.name
|
||||
end
|
||||
|
||||
def name
|
||||
confirmation.releasable.name
|
||||
end
|
||||
|
||||
def source_file_name
|
||||
confirmation.source_file_name
|
||||
end
|
||||
|
||||
def clip_name
|
||||
confirmation.clip_name
|
||||
end
|
||||
|
||||
def source_file_and_clip_names
|
||||
[source_file_name, clip_name].reject(&:blank?).join(" - ")
|
||||
end
|
||||
|
||||
def timecode_in
|
||||
confirmation.timecode_in
|
||||
end
|
||||
|
||||
def timecode_out
|
||||
confirmation.timecode_out
|
||||
end
|
||||
|
||||
def duration
|
||||
confirmation.duration
|
||||
end
|
||||
|
||||
def contact_address
|
||||
confirmation.releasable.contact_person.address.to_s
|
||||
end
|
||||
|
||||
def applicable_media
|
||||
confirmation.releasable.applicable_medium_value
|
||||
end
|
||||
|
||||
def territory
|
||||
confirmation.releasable.territory_value
|
||||
end
|
||||
|
||||
def term
|
||||
confirmation.releasable.term_value
|
||||
end
|
||||
|
||||
def restrictions
|
||||
confirmation.releasable.restriction_value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user