source: ammosreader/org/README.org@ b00fbbb

AmmosSource guix
Last change on this file since b00fbbb was b00fbbb, checked in by Enrico Schwass <ennoausberlin@…>, 2 years ago

README.org updated

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