def main():
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--config', help='Config file')
args = parser.parse_args()
if args.config:
with open(args.config) as input:
config = json.load(input)
else:
config = {}
if not config.get('disable_collection', False):
logger.info('Sending version information to stitchdata.com. ' +
'To disable sending anonymous usage data, set ' +
'the config parameter "disable_collection" to true')
threading.Thread(target=send_usage_stats).start()
input = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8')
state = persist_lines(config.get('delimiter', ','),
config.get('quotechar', '"'),
input)
emit_state(state)
logger.debug("Exiting normally")
评论列表
文章目录