@click.command(context_settings=CONTEXT_SETTINGS)<EOL>@click.option('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', flag_value='<STR_LIT>')<EOL>@click.option('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', flag_value='<STR_LIT>')<EOL>@click.option('<STR_LIT>', '<STR_LIT>', flag_value='<STR_LIT>')<EOL>@click.option('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', flag_value='<STR_LIT>')<EOL>@click.argument('<STR_LIT:input>', type=click.File('<STR_LIT:r>'), default='<STR_LIT:->')<EOL>@click.argument('<STR_LIT>', type=click.File('<STR_LIT:w>'), default='<STR_LIT:->')<EOL>def cli(out_fmt, input, output):
_input = StringIO()<EOL>for l in input:<EOL><INDENT>try:<EOL><INDENT>_input.write(str(l))<EOL><DEDENT>except TypeError:<EOL><INDENT>_input.write(bytes(l, '<STR_LIT:utf-8>'))<EOL><DEDENT><DEDENT>_input = seria.load(_input)<EOL>_out = (_input.dump(out_fmt))<EOL>output.write(_out)<EOL>
Converts text.