CLI: print meta data

This commit is contained in:
Mario Fink 2021-01-18 11:30:42 +01:00
parent 156d8ce62f
commit b5afab3c20
2 changed files with 9 additions and 1 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ build/
*.dat *.dat
data/ data/
tdmripper tdmripper
*.csv

View File

@ -181,12 +181,16 @@ int main(int argc, char* argv[])
if ( listgroups ) jack.list_groups(); if ( listgroups ) jack.list_groups();
if ( listchannels ) jack.list_channels(); if ( listchannels ) jack.list_channels();
// write all groups/channels to filesystem // write data to filesystem
if ( !listgroups && !listchannels ) if ( !listgroups && !listchannels )
{ {
// declare filesystem path
std::filesystem::path pd = output; std::filesystem::path pd = output;
// check for given directory
if ( std::filesystem::is_directory(pd) ) if ( std::filesystem::is_directory(pd) )
{ {
// print (group,channel) data
for ( int g = 0; g < jack.num_groups(); g++ ) for ( int g = 0; g < jack.num_groups(); g++ )
{ {
// get and sanitize group name // get and sanitize group name
@ -218,6 +222,9 @@ int main(int argc, char* argv[])
jack.print_channel(chidx,outfile.c_str()); jack.print_channel(chidx,outfile.c_str());
} }
} }
// print meta data
jack.print_meta((pd / "meta-data.txt").c_str());
} }
else else
{ {