mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 08:50:48 +00:00
Update __main__.py
Fixed text formatting
This commit is contained in:
@@ -7,40 +7,43 @@ import sys
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
parser.usage = "ptulsconv TEXT_EXPORT.txt"
|
parser.usage = "ptulsconv TEXT_EXPORT.txt"
|
||||||
|
|
||||||
filter_opts = OptionGroup(title='Filtering Options', parser=parser)
|
filter_opts = OptionGroup(title='Filtering Options', parser=parser)
|
||||||
|
|
||||||
filter_opts.add_option('-i', dest='in_time', help="Don't output events occurring before this timecode.", metavar='TC')
|
filter_opts.add_option('-i', dest='in_time', help="Don't output events occurring before this timecode.",
|
||||||
filter_opts.add_option('-o', dest='out_time', help="Don't output events occurring after this timecode.", metavar='TC')
|
metavar='TC')
|
||||||
|
filter_opts.add_option('-o', dest='out_time', help="Don't output events occurring after this timecode.",
|
||||||
|
metavar='TC')
|
||||||
# parser.add_option('-P', '--progress', default=False, action='store_true', dest='show_progress',
|
# parser.add_option('-P', '--progress', default=False, action='store_true', dest='show_progress',
|
||||||
# help='Show progress bar.')
|
# help='Show progress bar.')
|
||||||
filter_opts.add_option('-m', '--include-muted', default=False, action='store_true', dest='include_muted',
|
filter_opts.add_option('-m', '--include-muted', default=False, action='store_true', dest='include_muted',
|
||||||
help='Include muted clips.')
|
help='Include muted clips.')
|
||||||
|
|
||||||
filter_opts.add_option('-R', '--reel', dest='select_reel', help="Output only events in reel N, and recalculate start "
|
filter_opts.add_option('-R', '--reel', dest='select_reel', help="Output only events in reel N, and recalculate "
|
||||||
" times relative to that reel's start time.",
|
" start times relative to that reel's start time.",
|
||||||
default=None, metavar='N')
|
default=None, metavar='N')
|
||||||
|
|
||||||
parser.add_option_group(filter_opts)
|
parser.add_option_group(filter_opts)
|
||||||
|
|
||||||
output_opts = OptionGroup(title="Output Options", parser=parser)
|
output_opts = OptionGroup(title="Output Options", parser=parser)
|
||||||
output_opts.add_option('--json', default=False, action='store_true', dest='write_json',
|
output_opts.add_option('--json', default=False, action='store_true', dest='write_json',
|
||||||
help='Output a JSON document instead of XML. If this option is enabled, --xform with have no'
|
help='Output a JSON document instead of XML. If this option is enabled, --xform will have no'
|
||||||
'effect')
|
'effect.')
|
||||||
|
|
||||||
output_opts.add_option('--xform', dest='xslt', help="Convert with built-is XSLT transform.",
|
output_opts.add_option('--xform', dest='xslt', help="Convert with built-is XSLT transform.",
|
||||||
default=None, metavar='NAME')
|
default=None, metavar='NAME')
|
||||||
|
|
||||||
output_opts.add_option('--show-available-tags', dest='show_tags',
|
output_opts.add_option('--show-available-tags', dest='show_tags',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False, help='Display tag mappings for the FMP XML output style and exit.')
|
default=False, help='Display tag mappings for the FMP XML output style and exit.')
|
||||||
|
|
||||||
output_opts.add_option('--show-available-transforms', dest='show_transforms',
|
output_opts.add_option('--show-available-transforms', dest='show_transforms',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False, help='Display available built-in XSLT transforms.')
|
default=False, help='Display available built-in XSLT transforms.')
|
||||||
|
|
||||||
parser.add_option_group(output_opts)
|
parser.add_option_group(output_opts)
|
||||||
|
|
||||||
@@ -49,7 +52,7 @@ def main():
|
|||||||
print_banner_style("%s %s (c) 2020 %s. All rights reserved." % (__name__, __version__, __author__))
|
print_banner_style("%s %s (c) 2020 %s. All rights reserved." % (__name__, __version__, __author__))
|
||||||
|
|
||||||
print_section_header_style("Startup")
|
print_section_header_style("Startup")
|
||||||
print_status_style("This run started %s" % (datetime.datetime.now().isoformat() ) )
|
print_status_style("This run started %s" % (datetime.datetime.now().isoformat()))
|
||||||
|
|
||||||
if options.show_tags:
|
if options.show_tags:
|
||||||
dump_field_map('ADR')
|
dump_field_map('ADR')
|
||||||
|
|||||||
Reference in New Issue
Block a user