From b5afab3c207876503614952ee690de62fd326db0 Mon Sep 17 00:00:00 2001 From: Mario Fink Date: Mon, 18 Jan 2021 11:30:42 +0100 Subject: [PATCH] CLI: print meta data --- .gitignore | 1 + src/main.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 44667fe..03f0db2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ build/ *.dat data/ tdmripper +*.csv diff --git a/src/main.cpp b/src/main.cpp index d6bad3a..e58f098 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -181,12 +181,16 @@ int main(int argc, char* argv[]) if ( listgroups ) jack.list_groups(); if ( listchannels ) jack.list_channels(); - // write all groups/channels to filesystem + // write data to filesystem if ( !listgroups && !listchannels ) { + // declare filesystem path std::filesystem::path pd = output; + + // check for given directory if ( std::filesystem::is_directory(pd) ) { + // print (group,channel) data for ( int g = 0; g < jack.num_groups(); g++ ) { // get and sanitize group name @@ -218,6 +222,9 @@ int main(int argc, char* argv[]) jack.print_channel(chidx,outfile.c_str()); } } + + // print meta data + jack.print_meta((pd / "meta-data.txt").c_str()); } else {