Skip to content

DHBern/parzival-static-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

265 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static backend for Parzival app(s)

Principle

Data is generated using src/generate.xsl and served under dist.

In addition to this, the script also serves to fetch export files from the working environment (parzDB database). As fetching the nearly 900 files takes a while, it is recommended to execute the function only when needed (e.g. after significant data updates).

Lastly, the repository also contains a template for a TEIPublisher application (src/teipb) serving as a base for a xar file created during the CI procedures. This file is deployed at https://dhbern.github.io/parzival-static-api/parzival-*.xar and fetched by the pop-up publisher instance (see https://github.com/DHBern/presentation_parzival for more context).

Usage

  • Execute the wrapper script with one of the following options:

    • ./parzival-static-api.sh --generate to generate outputs for dist/api
    • ./parzival-static-api.sh --fetch-exports to collect export files to dist/api/export
    • ./parzival-static-api.sh --generate-monopsis to generate the merged monopsis PDF (dist/api/pdf/Parzival_Eintextedition.pdf) from locally stored source PDFs
  • Alternatively:

    • Move to src directory
    • Run generate.xsl with an XSLT processor (≥ 3.0).
      • (Optionally) supply tasks to be executed using the do parameter (multiple tasks may be given space separated within quotation marks).
      • (Optionally) set verbose=true to track the execution of the pipeline.
      • To run all tasks use all=true instead of do.
      • Example command: java -cp "$path-to-saxon:$path-to-saxon-libs" net.sf.saxon.Transform -s:src/generate.xsl -xsl:src/generate.xsl do='' verbose=false do='pass-through-originals contiguous-ranges.

The monopsis PDF is generated from locally stored, non-public source PDFs located under src/data/pdf/. The corresponding workflow is implemented in Python and is intentionally kept separate from the XSLT-based generation pipeline.

Further details and requirements can be found in src/monopsis/README.md.

Future options

  • Consider CI using Github actions with use-saxon.

About

Data endpoints for the Parzival DSE (2024 incarnation)

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages