Skip to content
Snippets Groups Projects
Select Git revision
  • edf7398e18af0de870adefdb52b5af6f2ed22240
  • master default protected
  • 0.40.0
  • 0.39.9
  • 0.39.7
  • 0.39.6
  • 0.39.5
  • 0.39.4
  • 0.39.3
  • 0.39.2
  • 0.39.1
  • 0.39.0
  • 0.38.0
  • 0.37.5
  • 0.37.4
  • 0.37.3
  • 0.37.2
  • 0.37.1
  • 0.37.0
  • 0.36.3
  • 0.36.2
  • 0.36.1
22 results

README.rst

Blame
  • README.rst 2.55 KiB
    cal.png

    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)

    http://server:port/update

    pulls the latest version from origin master

    version (GET)

    http://server:port/version

    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