
cal
Conditioning, processing and preparation of calibration document related database requests.
See also this wiki page.
api
inter/<year_cer> [GET]
returns the intermediate-document of the calibration documents belonging to a certain year and certificate number
inter/<year_cer> [POST]
In order to generate and save the cert doc to database execute:
curl --header "Content-Type: application/json" -X POST -d '{"save":true}' http://localhost:5001/inter/2019-75059
cer/latex/<cer_doc_id>
Retrieve the LaTeX source of a intermediate-document:
curl http://localhost:5001/cer/latex/cer-2019-75059
This can be saved and compiled:
curl http://localhost:5001/cer/latex/cer-2019-75059 > ks-75059-2019.tex
xelatex tst.txt
update (POST)
pulls the latest version from origin master
version (GET)
virtual env
> python3 -m venv /path/to/cal
> cd /path/to/cal
> source bin/activate
install dependencies
> cd /path/to/cal
> source bin/activate
> pip install -e .
run server
> cd /path/to/cal
> ./server
install daemon and start
> cd /usr/local/share/cal # working directory
> sudo nobody
> git clone git@a75436.berlin.ptb.de:vaclab/cal.git
> cd cal
>
> ## follow instructions of chapter --> virtual env
> ## follow instructions of chapter --> install dependencies
>
> sudo systemctl daemon-reload # if already exist
> sudo systemctl link $PWD/cal.service # make permanent
> sudo systemctl restart cal.service
> sudo systemctl status cal.service # running?
> journalctl -f --unit cal.service # run-time check
Addendum: Alternative installation procedure
RN (1/2021)
Since the procedure shown above for installing the required Python packages does not work safely in every environment, it is better to proceed as follows:
cd /path/to/cal
python3 -m venv ./
source bin/activate
pip3 install pip-tools
pip-compile --output-file=requirements.txt requirements.in
pip3 install -r requirements.txt