CPS Coffeebook

This Quarto publising demo performs user defined SPARQL queries to generate Quarto markdown for use in demo documents.

This project depends on CPS Impress.

CPS

CPS tools have been written for and provided by the CPS (Computational Publishing Service) as part of NFDI4Culture hosted at Wikibase4Research at TIB.

Setup

Debian
sudo apt install build-essential python3-full python3-pip git
git clone https://gitlab.com/nfdi4culture/computational-publishing-service/cps_coffeebook
cd cps_coffeebook
make venv

TCSH

source ~/.venvs/cps_coffeebook/bin/activate.csh
make install
rehash

BASH

source ~/.venvs/cps_coffeebook/bin/activate
make install

Environment

An environment file .env is used to contain configuration data. See “dotenv” for details.

Within the root directory of the project the sub-directory configuration is as follows:

PROJECT_DIR="./Impress"
CACHE_DIR="./Quarto"

Within the Quarto directory, the .env would contain:

PROJECT_DIR="../Impress"
CACHE_DIR="."

And finally, in the Notebook directory:

PROJECT_DIR="../Impress"
CACHE_DIR="../Quarto"

Project

The cps_impress project directory contains project subdirectories each with at least two files:

  • query.py
  • template.j2

The query.py file has two methods, one to return the SPARQL query string for CPS Impress and the other to filter the SPARQL query results.

The template file is any name with a j2 extention and this is a Jinja2 template file.

Notebook

The notebook directory contains jupyter-notebook project files demonstrating queries and templates visually.

make notebook

Quarto

This directory contains Quarto project to generate documents in docx and PDF format.

cd Quarto

Initially you may require Latex support to be installed, this can be achieved by entering:

make setup

To generate the demo documents, enter make:

make
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies