예제 #1
0
def threshold(args, which):
    """Parser for the less_than and average filter"""
    parser = common_args()
    parser.add_argument("threshold", type=int, help="Count threshold")
    parsed_args = parser.parse_args(args)

    if which == "less_than":
        count_sum.write_files(count_sum.less_than(parsed_args.directory,
                                                  parsed_args.threshold,
                                                  delete_flag=parsed_args.del_flag))
    elif which == "average":
        count_sum.write_files(count_sum.average_all(parsed_args.directory,
                                                    parsed_args.threshold,
                                                    delete_flag=parsed_args.del_flag))
예제 #2
0
def raw_sum(args):
    """Argument parser for summing count files"""
    parser = argparse.ArgumentParser(description=description())
    parser.add_argument("directory", help="Directory containing sub directories with count files")
    parsed_args = parser.parse_args(args)
    count_sum.write_files(count_sum.get_file_data(parsed_args.directory))
예제 #3
0
def zero(args):
    """Parser for the zero filter"""
    parser = common_args()
    parsed_args = parser.parse_args(args)

    count_sum.write_files(count_sum.zero_all(parsed_args.directory, delete_flag=parsed_args.del_flag))