Skip to content

Commit

Permalink
Added support for Adobe Premiere EDLs > 999 events
Browse files Browse the repository at this point in the history
  • Loading branch information
iluvcapra committed Jan 4, 2025
1 parent 1e1331e commit a86ef7e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pycmx/parse_cmx_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def _edl_m2_column_widths():
def _parse_cmx3600_line(line, line_number):
long_event_num_p = re.compile("^[0-9]{6} ")
short_event_num_p = re.compile("^[0-9]{3} ")

x_event_form_p = re.compile("^([0-9]{4,5}) ")

if isinstance(line,str):
if line.startswith("TITLE:"):
return _parse_title(line,line_number)
Expand All @@ -67,6 +68,11 @@ def _parse_cmx3600_line(line, line_number):
return _parse_long_standard_form(line, 128, line_number)
elif short_event_num_p.match(line) != None:
return _parse_standard_form(line, line_number)
elif (m := x_event_form_p.match(line)) != None:
assert m is not None
event_field_length = len(m[1])
return _parse_columns_for_standard_form(line, event_field_length,
8, line_number)
elif line.startswith("AUD"):
return _parse_extended_audio_channels(line,line_number)
elif line.startswith("*"):
Expand Down
5 changes: 5 additions & 0 deletions tests/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ def test_transition_name(self):
events = list(edl.events)
self.assertEqual( events[4].edits[1].transition.name , "CROSS DISSOLVE" )

def test_adobe_wide(self):
with open("tests/edls/adobe_dai109_test.txt", 'r', encoding='ISO-8859-1') as f:
edl = pycmx.parse_cmx3600(f)
events = list(edl.events)
self.assertEqual(len(events), 2839)

# add test for edit_list.channels

0 comments on commit a86ef7e

Please sign in to comment.