def main():
import argparse<EOL>from pkg_resources import require<EOL>parser = argparse.ArgumentParser(description=main.__doc__)<EOL>parser.add_argument(<EOL>"<STR_LIT:data>",<EOL>nargs=argparse.REMAINDER,<EOL>help="<STR_LIT>"<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store_true>",<EOL>help="<STR_LIT>"<EOL>)<EOL>args = parser.parse_args()<EOL>if args.version:<EOL><INDENT>version = require("<STR_LIT>")[<NUM_LIT:0>].version<EOL>print (version)<EOL>sys.exit(<NUM_LIT:0>)<EOL><DEDENT>if os.isatty(<NUM_LIT:0>) and not args.data:<EOL><INDENT>parser.print_help()<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>elif args.data:<EOL><INDENT>arg_string = u'<STR_LIT:U+0020>'.join(args.data)<EOL><DEDENT>else:<EOL><INDENT>arg_string = sys.stdin.read()<EOL><DEDENT>try:<EOL><INDENT>output = sparkify(guess_series(arg_string))<EOL><DEDENT>except:<EOL><INDENT>sys.stderr.write("<STR_LIT>")<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>print (output.encode('<STR_LIT:utf-8>', '<STR_LIT:ignore>'))<EOL>
u"""Reads from command line args or stdin and prints a sparkline from the
    data.  Requires at least 2 data points as input.