gris_parse_calib 717 Bytes
Newer Older
1
2
3
4
import logging

from kis_tools.interface import BasicArgParser
from kis_tools.interface.commandline_interface import add_option_outfile
5
from kis_tools.util.swag import greeter
6
7
8

logger = logging.getLogger(__name__)

9
10
print(greeter)

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
parser = BasicArgParser()
add_option_outfile(parser)

args = parser.parse_args()

folder_in = args.folder_in

# Setup verbose option
verbose = args.verbose
logging_level = logging.INFO if verbose else logging.WARNING
logging.basicConfig(level=logging_level)

# Perform parsing
logger.info(f"Parsing {folder_in}")
from kis_tools.gris.calib_settings.parsing import parse_path

df = parse_path(folder_in)

# Output:
30
31
32
33
if args.output_file:
    df.to_csv(args.output_file)
else:
    print(df)