ELOG-poll is a shell script (BASH) designed to simplify and automatise
interfacing with an ELOG server.
It runs in a Linux box with basic command line tools installed.
It might work also on macOS and Windows Subsystem for Linux.
In particular, it wraps around the elog
command line program which is
shipped together with the ELOG source code.
Together with the script, two C++ programs are also provided, serving as parser and producer, that perform parsing of ELOG posts and preparation of data to be attached in the reply.
First make sure that the following dependencies are installed in your system:
- gcc >= 4.9
- cmake >= 2.6
- ROOT >= 5.34
The building process in handled via CMake. Type the following commands from a shell in the repository folder:
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make
This will build the executables in the build
directory. Feel free to
change the name of this folder to any of your choice.
The program is configured via a set of environment variables and it checks whether they are set during start-up and will notify the user about missing ones.
Here the list of the environment variables is shown:
- ELOG_EXE: Path to the
elog
executable - ELOG_SERVER: Address of the ELOG server
- ELOG_PORT: Port of the ELOG server
- ELOG_USES_SSL: Specify the use of SSL for connecting to ELOG [y|n]
- ELOG_BOOK: Logbook to poll
- ELOG_USER: User name for reading ELOG posts
- ELOG_PASSWORD: Password of the user specified in the variable above
- ELOG_LAST_POST: Path of the file containing the id of the first post to check
- ELOG_PARSER: Path to the elog-parse executable
- ELOG_PRODUCER: Path to the data producer executable
These can be set externally via command line - either manually or in a
shell file automatically loaded, e.g. .bashrc
- or written inside the
script itself. For the latter solution, there is some room already
allocated on top of the file.
NOTE: when setting from external environment, make sure the variables
are export
ed.
NOTE: the values set inside the script override the values set externally.
Run the elog-poll.sh
script from the command line.
Type
./elog-poll.sh -h # or --help
to get the help.
- GNU bash
- GNU coreutils