diff --git a/lib/imc_channel.hpp b/lib/imc_channel.hpp index 578957d..77450ec 100644 --- a/lib/imc_channel.hpp +++ b/lib/imc_channel.hpp @@ -375,9 +375,9 @@ namespace imc if ( sep == ' ' ) { fou<first + std::string(".csv"); + std::string chid = std::string("channel_") + it->first; + std::string filenam = it->second.name_.empty() ? chid + std::string(".csv") + : it->second.name_ + std::string(".csv"); std::filesystem::path pf = pd / filenam; // and print the channel diff --git a/src/main.cpp b/src/main.cpp index e54bd58..660ff1a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -119,7 +119,7 @@ void show_usage() // <<" -g, --listgroups list channelgroups\n" <<" -c, --listchannels list channels\n" <<" -b, --listblocks list IMC key-blocks\n" - <<" -d, --output output directory\n" + <<" -d, --output output directory to print channels\n" <<" -h, --help show this help message \n" <<" -v, --version display version\n" <<"\n"; @@ -198,9 +198,13 @@ int main(int argc, char* argv[]) } // print channel(s) to certain directory - if ( cfgopts.count("directory") == 1 ) + if ( cfgopts.count("output") == 1 ) { - std::cout<