diff --git a/ptulsconv/__init__.py b/ptulsconv/__init__.py index 9702508..27e8aca 100644 --- a/ptulsconv/__init__.py +++ b/ptulsconv/__init__.py @@ -1,6 +1,6 @@ from ptulsconv.docparser.ptuls_grammar import protools_text_export_grammar -__version__ = '1.0.2' +__version__ = '1.0.4' __author__ = 'Jamie Hardt' __license__ = 'MIT' __copyright__ = "%s %s (c) 2022 %s. All rights reserved." % (__name__, __version__, __author__) diff --git a/ptulsconv/__main__.py b/ptulsconv/__main__.py index cdeedfd..9adeaf5 100644 --- a/ptulsconv/__main__.py +++ b/ptulsconv/__main__.py @@ -23,6 +23,18 @@ def dump_field_map(output=sys.stdout): TagMapping.print_rules(ADRLine, output=output) +def dump_formats(): + print_section_header_style("`raw` format:") + sys.stderr.write("A JSON document of the parsed Pro Tools export.\n") + print_section_header_style("`tagged` Format:") + sys.stderr.write("A JSON document containing one record for each clip, with\n" + "all tags parsed and all tagging rules applied. \n") + print_section_header_style("`doc` format:") + sys.stderr.write("Creates a directory with folders for different types\n" + "of ADR reports.\n\n") + + + def main(): """Entry point for the command-line invocation""" parser = OptionParser() @@ -50,6 +62,13 @@ def main(): description='Print useful information and exit without processing ' 'input files.') + informational_options.add_option('--show-formats', + dest='show_formats', + action='store_true', + default=False, + help='Display helpful information about the ' + 'available output formats.') + informational_options.add_option('--show-available-tags', dest='show_tags', action='store_true', @@ -71,6 +90,10 @@ def main(): dump_field_map() sys.exit(0) + elif options.show_formats: + dump_formats() + sys.exit(0) + if len(args) < 2: print_fatal_error("Error: No input file") parser.print_help(sys.stderr)