README: installation + usage

This commit is contained in:
Mario Fink 2021-02-12 12:14:51 +01:00
parent dd78b37290
commit 133279258f
3 changed files with 62 additions and 1 deletions

View File

@ -113,6 +113,59 @@ component, text field or buffer.
## Installation
### CLI tool
The _IMCtermite_ library may be employed both as a _CLI_ tool and a _python_
module. To build the CLI tool locally use the default target `make` resulting
in the binary `imctermite` while the installation of it in the location
`/usr/local/bin` is done via
```
make install
````
which may require root permissions.
### Python
To integrate the library into a customized ETL toolchain several cython targets
are available. For a local build that enables you to run the examples use:
```
make cython-build
```
However, in a production environment a proper installation of the module with
`make cython-install` is recommended for system-wide availability of the module.
## Usage
### CLI
The usage of the `imctermite` binary looks like this
```
imctermite <raw-file> [options]
```
since you have to provide a single _raw_ files and any option to specify what
to do with the data. All available options can be listed with `imctermite --help`:
```
Options:
-c, --listchannels list channels
-b, --listblocks list IMC key-blocks
-d, --output output directory to print channels
-h, --help show this help message
-v, --version display version
```
For instance, to show a list of all channels included in `sample-data.raw`, you
do `imctermite sample-data.raw --listchannels`. By default, no output files are
written but only when an existing (!) directory is provided as argument to
the `--output` option.
### Python
## References

View File

@ -63,6 +63,14 @@ docker-run:
cython-build : $(CYT)setup.py $(CYT)imc_termite.pxd $(CYT)py_imc_termite.pyx $(HPP)
python3 $< build_ext --inplace
cp -v imc_termite_cpython-*.so $(PYT)
cython-install : $(CYT)setup.py $(CYT)imc_termite.pxd $(CYT)py_imc_termite.pyx $(HPP)
python3 $< install --record files_imctermite.txt
cython-clean :
rm -vf imc_termite_cpython-*.so
rm -vf $(PYT)imc_termite_cpython-*.so
#-----------------------------------------------------------------------------#
# Python (to be removed)

View File

@ -116,7 +116,7 @@ void show_usage()
<<"\n\n"
<<"Options:"
<<"\n\n"
<<" -m, --showmeta show meta information about IMC dataset\n"
// <<" -m, --showmeta show meta information about IMC dataset\n"
// <<" -g, --listgroups list channelgroups\n"
<<" -c, --listchannels list channels\n"
<<" -b, --listblocks list IMC key-blocks\n"