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