guix
|
Last change
on this file was efb5900, checked in by Enrico Schwass <ennoausberlin@…>, 3 years ago |
|
README.md updated
|
-
Property mode
set to
100644
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | # AmmosReader
|
|---|
| 2 |
|
|---|
| 3 | Project containing necessary File- or SocketStream-Reader to read the
|
|---|
| 4 | various datastreams of Ammos
|
|---|
| 5 |
|
|---|
| 6 | # Installation
|
|---|
| 7 |
|
|---|
| 8 | ## Standard pip install (not tested on all platforms)
|
|---|
| 9 |
|
|---|
| 10 | ``` shell
|
|---|
| 11 | git clone http://gitlab.kid.local/kidzg/ammosreader.git
|
|---|
| 12 | cd ammosreader
|
|---|
| 13 | python3 -m pip install .
|
|---|
| 14 | ```
|
|---|
| 15 |
|
|---|
| 16 | ## Using the guix functional package manager
|
|---|
| 17 |
|
|---|
| 18 | First subscribe to the GUIX oai channel (see Chapter Add channel to
|
|---|
| 19 | system) in
|
|---|
| 20 | <https://gitlab.kid.local/kidzg/guix-deployment/-/blob/master/DevOps.org>)
|
|---|
| 21 |
|
|---|
| 22 | Then install using the guix
|
|---|
| 23 |
|
|---|
| 24 | ``` shell
|
|---|
| 25 | guix package -i python-ammosreader
|
|---|
| 26 | ```
|
|---|
| 27 |
|
|---|
| 28 | # Usage
|
|---|
| 29 |
|
|---|
| 30 | There are two scripts, which demonstrate the usage of the ammosreader
|
|---|
| 31 | package.
|
|---|
| 32 |
|
|---|
| 33 | ## iqdw_reader.py
|
|---|
| 34 |
|
|---|
| 35 | ``` shell
|
|---|
| 36 | python3 iqdw_reader.py 'path_to_iqdw_file'
|
|---|
| 37 | ```
|
|---|
| 38 |
|
|---|
| 39 | ## pdw_reader.py
|
|---|
| 40 |
|
|---|
| 41 | ``` shell
|
|---|
| 42 | python3 pdw_reader.py 'path_to_pdw_file'
|
|---|
| 43 | ```
|
|---|
| 44 |
|
|---|
| 45 | To minimize depencencies of the core package other scripts
|
|---|
| 46 | (audio_reader, ammos_viewer) are now stored in separate packages.
|
|---|
| 47 |
|
|---|
| 48 | # Logging
|
|---|
| 49 |
|
|---|
| 50 | If you use ammosreader in your own scripts a logger can be imported and
|
|---|
| 51 | used as follows:
|
|---|
| 52 |
|
|---|
| 53 | ``` python
|
|---|
| 54 | from ammosreader import logger
|
|---|
| 55 | logger.warning("Put your warning here")
|
|---|
| 56 | ```
|
|---|
| 57 |
|
|---|
| 58 | The name of the logfile is ammos.log The logger uses the directory
|
|---|
| 59 | stored in the AMMOS_LOG_DIR environment variable. If this variable is
|
|---|
| 60 | not set, /tmp is used as default. If the logfile is not writable, the
|
|---|
| 61 | standard logger config is used and the logs go directly to console
|
|---|
| 62 | (tty). (see ammos_logging.conf file in this repository)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.