def generate(argv: List[str]) -> bool:
opts = genargs().parse_args(argv)<EOL>filebase = os.path.dirname(opts.infile) + str(os.path.basename(opts.infile).rsplit('<STR_LIT:.>', <NUM_LIT:1>)[<NUM_LIT:0>])<EOL>if opts.nojson:<EOL><INDENT>opts.jsonfile = None<EOL><DEDENT>elif not opts.jsonfile:<EOL><INDENT>opts.jsonfile = filebase + "<STR_LIT>"<EOL><DEDENT>if opts.nordf:<EOL><INDENT>opts.rdffile = None<EOL><DEDENT>elif not opts.rdffile:<EOL><INDENT>opts.rdffile = filebase + "<STR_LIT:.>" + rdf_suffix(opts.format)<EOL><DEDENT>if do_parse(opts.infile, opts.jsonfile, opts.rdffile, opts.format, opts.context):<EOL><INDENT>if opts.jsonfile:<EOL><INDENT>print("<STR_LIT>".format(opts.jsonfile))<EOL><DEDENT>if opts.rdffile:<EOL><INDENT>print("<STR_LIT>".format(opts.format, opts.rdffile))<EOL><DEDENT>return True<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>")<EOL>return False<EOL><DEDENT>
Transform ShExC to ShExJ
:param argv: Command line arguments
:return: True if successful