mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 08:50:48 +00:00
Reformatted file
This commit is contained in:
@@ -40,6 +40,7 @@ adr_field_map = ((['Title', 'PT.Session.Name'], 'Title', str),
|
|||||||
(['ADLIB'], 'Adlib', str),
|
(['ADLIB'], 'Adlib', str),
|
||||||
(['OPT'], 'Optional', str))
|
(['OPT'], 'Optional', str))
|
||||||
|
|
||||||
|
|
||||||
def fmp_dump(data, input_file_name, output):
|
def fmp_dump(data, input_file_name, output):
|
||||||
doc = TreeBuilder(element_factory=None)
|
doc = TreeBuilder(element_factory=None)
|
||||||
|
|
||||||
@@ -106,7 +107,8 @@ def dump_field_map(field_map_name, output=sys.stdout):
|
|||||||
output.write("# %25s| %20s | %8s\n" % (tag[:25], field[1][:20], field[2].__name__))
|
output.write("# %25s| %20s | %8s\n" % (tag[:25], field[1][:20], field[2].__name__))
|
||||||
|
|
||||||
|
|
||||||
def convert(input_file, output_format='fmpxml', start=None, end=None, progress=False, include_muted=False, output=sys.stdout):
|
def convert(input_file, output_format='fmpxml', start=None, end=None, progress=False, include_muted=False,
|
||||||
|
output=sys.stdout):
|
||||||
with open(input_file, 'r') as file:
|
with open(input_file, 'r') as file:
|
||||||
ast = ptulsconv.protools_text_export_grammar.parse(file.read())
|
ast = ptulsconv.protools_text_export_grammar.parse(file.read())
|
||||||
dict_parser = ptulsconv.DictionaryParserVisitor()
|
dict_parser = ptulsconv.DictionaryParserVisitor()
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class DictionaryParserVisitor(NodeVisitor):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def visit_clips_section(node, visited_children):
|
def visit_clips_section(node, visited_children):
|
||||||
channel = next(iter(visited_children[2][5]), 1)
|
channel = next(iter(visited_children[2][3]), 1)
|
||||||
|
|
||||||
return list(map(lambda child: dict(clip_name=child[0], file=child[2], channel=channel),
|
return list(map(lambda child: dict(clip_name=child[0], file=child[2], channel=channel),
|
||||||
visited_children[2]))
|
visited_children[2]))
|
||||||
|
|||||||
Reference in New Issue
Block a user