* cython/*_imc_termite.*: introduce both print_channel/print_channels

methods featuring csv delimiter option
* imc_raw.hpp: add print_channel()
* python/{example.py,usage.py}: adjust to existing sample file names,
  add print_channel() example
* src/main.cpp: add --delimiter option, additional CLI option checks
This commit is contained in:
Mario Fink
2021-06-28 16:26:07 +02:00
parent bafc018566
commit 234876c5a9
6 changed files with 90 additions and 30 deletions

View File

@@ -14,6 +14,7 @@ cdef extern from "imc_raw.hpp" namespace "imc":
void set_file(string rawfile) except +
# get JSON list of channels
vector[string] get_channels(bool json, bool data) except +
# print all channels
void print_channels(string outputdir) except +
# print single channel/all channels
void print_channel(string channeluuid, string outputdir, char delimiter) except +
void print_channels(string outputdir, char delimiter) except +
void print_table(string outputfile) except +

View File

@@ -25,9 +25,11 @@ cdef class imctermite:
chnlstjn = [jn.loads(chn.decode(errors="ignore")) for chn in chnlst]
return chnlstjn
# print channels
def print_channels(self, string outputdir):
self.cpp_imc.print_channels(outputdir)
# print single channel/all channels
def print_channel(self, string channeluuid, string outputfile, char delimiter):
self.cpp_imc.print_channel(channeluuid,outputfile,delimiter)
def print_channels(self, string outputdir, char delimiter):
self.cpp_imc.print_channels(outputdir,delimiter)
# print table including channels
def print_table(self, string outputfile):