REAME.md: docu for CLI tool
This commit is contained in:
parent
5535135e46
commit
e900fd7be6
34
README.md
34
README.md
@ -142,16 +142,46 @@ build the binary locally with `make` and install it in your preferred location.
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
### CLI tool
|
||||||
|
|
||||||
The usage of the CLI tool is sufficiently clarified by its help message displayed
|
The usage of the CLI tool is sufficiently clarified by its help message displayed
|
||||||
by `tdmreaper --help`. For instance, to extract the data decoded in the pair of
|
by `tdmreaper --help`. For instance, to extract the data decoded in the pair of
|
||||||
files `samples/SineData.tdm` and `samples/SineData.tdx` into the directory
|
files `samples/SineData.tdm` and `samples/SineData.tdx` into the directory
|
||||||
`/home/jack/data/`:
|
`/home/jack/data/`:
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
tdmreaper --output /home/jack/data samples/SineData.tdm samples/SineData.tdx
|
tdmreaper samples/SineData.tdm samples/SineData.tdx --output /home/jack/data
|
||||||
```
|
```
|
||||||
|
|
||||||
### CLI tool
|
The tool can also be used to list the available objects in TDM dataset, which
|
||||||
|
are i.a. _channels_, _channelgroups_ and TDX _blocks_. For instance, to list
|
||||||
|
all channels and channelgroups (without writing any file output):
|
||||||
|
|
||||||
|
```Shell
|
||||||
|
tdmreaper samples/SineData.tdm samples/SineData.tdx --listgroups --listchannels
|
||||||
|
```
|
||||||
|
|
||||||
|
The user may also submit a _filenaming rule_ to control names of the files the
|
||||||
|
channel(-group)s are written to. To this end, the _magic flags_ `%G` `%g`, `%C`
|
||||||
|
and `%c` representing the group id, group name, channel index and channel name
|
||||||
|
are defined. The default filenaming option is
|
||||||
|
|
||||||
|
```Shell
|
||||||
|
tdmreaper samples/SineData.tdm samples/SineData.tdx --output /home/jack/data --filenames channelgroup_%G.csv
|
||||||
|
```
|
||||||
|
|
||||||
|
which makes the tool write _all channels_ grouped into files according to their
|
||||||
|
group association, while all channelgroup filenames obey the pattern `channelgroup_%G.csv`
|
||||||
|
with `%G` being replaced by the group id. The filenaming rule enables the user
|
||||||
|
to extract only single channelgroup or channel by providing a particular
|
||||||
|
channel(-group) id in the filenaming flag. For example,
|
||||||
|
|
||||||
|
```Shell
|
||||||
|
tdmreaper samples/SineData.tdm samples/SineData.tdx --output /home/jack/data -f channel_usi16_%c.csv --includemeta
|
||||||
|
```
|
||||||
|
|
||||||
|
will write the single channel with id `usi16` (including its meta data as header)
|
||||||
|
to the file `/home/jack/data/channel_usi16_A4.csv`.
|
||||||
|
|
||||||
### Python
|
### Python
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user