From b819d9953f917252ac6697af1fd1ab939c953304 Mon Sep 17 00:00:00 2001 From: Ozbolt Menegatti Date: Mon, 10 Jun 2019 10:50:51 +0200 Subject: [PATCH] using new formatters via --out and --out-no-stat --- wani.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/wani.py b/wani.py index db87dc9..1b6c029 100644 --- a/wani.py +++ b/wani.py @@ -1217,7 +1217,12 @@ class Writer: @staticmethod def make_output_writer(args, colocation_ids, word_renderer): params = Writer.other_params(args) - return Writer(args.output, OutFormatter(colocation_ids, word_renderer), params) + return Writer(args.out, OutFormatter(colocation_ids, word_renderer), params) + + @staticmethod + def make_output_no_stat_writer(args, colocation_ids, word_renderer): + params = Writer.other_params(args) + return Writer(args.out_no_stat, OutNoStatFormatter(colocation_ids, word_renderer), params) @staticmethod def make_all_writer(args, colocation_ids, word_renderer): @@ -1496,11 +1501,13 @@ def main(structures_file, args): colocation_ids.determine_colocation_dispersions() # figure out representations! - if args.output: + if args.out or args.out_no_stat: colocation_ids.set_representations(word_renderer) Writer.make_output_writer(args, colocation_ids, word_renderer).write_out( structures, colocation_ids) + Writer.make_output_no_stat_writer(args, colocation_ids, word_renderer).write_out( + structures, colocation_ids) Writer.make_all_writer(args, colocation_ids, word_renderer).write_out( structures, colocation_ids) Writer.make_stats_writer(args, colocation_ids, word_renderer).write_out( @@ -1513,8 +1520,10 @@ if __name__ == '__main__': help='Structures definitions in xml file') parser.add_argument('input', help='input xml file in `ssj500k form`, can list more than one', nargs='+') - parser.add_argument('--output', + parser.add_argument('--out', help='Output file (if none given, then output to stdout)') + parser.add_argument('--out-no-stat', + help='Output file, but without statistical columns') parser.add_argument('--all', help='Additional output file, writes more data') parser.add_argument('--stats',