More command options

This commit is contained in:
Jamie Hardt
2019-10-09 12:31:30 -07:00
parent a3a3dba924
commit d77ef1c2f7
3 changed files with 22 additions and 9 deletions

View File

@@ -93,14 +93,14 @@ def fmp_dump(data, input_file_name, output):
output.write(xmlstr)
def convert(input_file, output_format='fmpxml', start=None, end=None, 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:
ast = ptulsconv.protools_text_export_grammar.parse(file.read())
dict_parser = ptulsconv.DictionaryParserVisitor()
parsed = dict_parser.visit(ast)
tcxform = ptulsconv.transformations.TimecodeInterpreter()
tagxform = ptulsconv.transformations.TagInterpreter()
tagxform = ptulsconv.transformations.TagInterpreter(show_progress=progress, ignore_muted=(not include_muted) )
parsed = tagxform.transform(tcxform.transform(parsed))