Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def cli_main():
args = dict(
prog=basename(sys.argv[0]),
version=svglib.__version__,
author=svglib.__author__,
license=svglib.__license__,
copyleft_year=svglib.__date__[:svglib.__date__.find('-')],
ts_pattern="{{dirname}}/out-"\
"{{now.hour}}-{{now.minute}}-{{now.second}}-"\
"%(base)s",
)
if args['prog'].endswith('2ps'):
args['ext'] = 'eps'
elif args['prog'].endswith('2pdf'):
args['ext'] = 'pdf'
elif args['prog'].endswith('2pm'):
args['ext'] = 'pm'
args['ext_caps'] = args['ext'].upper()
args['ts_pattern'] += ('.%s' % args['ext'])
desc = '{prog} v. {version}\n'.format(**args)
# import pdb; pdb.set_trace()
desc += 'A converter from SVG to {} (via ReportLab Graphics)\n'.format(args['ext_caps'])
if args['prog'].endswith('2pm'):