Commit 5b407bfc authored by Sean Leavey's avatar Sean Leavey

Tweak

parent c56399a8
PROG = "fibres"
DESC = "Fibre profile data extracter command line utility"
PROG = "fibrecnv"
DESC = "Fibre profile data converter utility"
VERS = "0.8.0"
URL = "https://git.ligo.org/sean-leavey/fibre-profile-extractor"
......
......@@ -8,8 +8,8 @@ import argparse
import textwrap
import collections
from . import SYNOPSIS, PROG
from . import extract
from profiler import PROG, SYNOPSIS, MANPAGE
from profiler import extract
def enable_verbose_logs(level):
handler = logging.StreamHandler()
......@@ -78,11 +78,17 @@ class List(Cmd):
# find identifiers and corresponding files in data directory
fibre_files = extract.find_fibre_files(input_dir)
# get valid identifiers
valid_ids = [k for k in fibre_files.keys() \
if extract.validate_fibre_file_group(fibre_files[k])]
if len(valid_ids):
# print them
print("Found the following identifiers:")
for k in fibre_files.keys():
if extract.validate_fibre_file_group(fibre_files[k]):
print(k)
for ident in valid_ids:
print(ident)
else:
print("Found no valid indentifiers")
class Convert(Cmd):
"""Convert fibre profile files into single file"""
......@@ -207,8 +213,6 @@ ALIAS = {
"-h": "help",
}
##################################################
def format_commands(man=False):
prefix = " " * 8
wrapper = textwrap.TextWrapper(
......@@ -253,7 +257,5 @@ def main():
func = get_func(cmd)
func(func.parse_args(args))
##################################################
if __name__ == "__main__":
main()
Markdown is supported
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