Commit 73241229 authored by Vincent Stehlé's avatar Vincent Stehlé
Browse files add a csv option

Add the --csv command line option to generate a .csv file. This is handy to
manually triage issues in a spreadsheet.

Signed-off-by: Vincent Stehlé's avatarVincent Stehlé <>
parent dfffc5af
......@@ -4,6 +4,7 @@
import sys
import argparse
import csv
#based loosley on
......@@ -162,12 +163,29 @@ def dict_2_md(input_list,file):
# Generate csv
def gen_csv(cross_check, filename):
# Find keys
keys = set()
for x in cross_check:
keys = keys.union(x.keys())
# Write csv
with open(filename, 'w', newline='') as csvfile:
writer = csv.DictWriter(
csvfile, fieldnames=sorted(keys), delimiter=';')
def main():
parser = argparse.ArgumentParser(
description='Process SCT results.'
' This program takes the SCT summary and sequence files,'
' and generates a nice report in mardown format.',
parser.add_argument('--csv', help='Output .csv filename')
'--md', help='Output .md filename', default='')
......@@ -231,6 +249,9 @@ def main():
# Generate csv if requested
if args.csv is not None:
gen_csv(cross_check, args.csv)
#command line argument 3&4, key are to support a key & value search.
#these will be displayed in CLI
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment