teigarage

EGE RESTful web service. Provides EGE functionality through RESTful web service way.

https://github.com/teic/teigarage

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary

Keywords

conversions rest-api tomcat xml
Last synced: 4 months ago · JSON representation ·

Repository

EGE RESTful web service. Provides EGE functionality through RESTful web service way.

Basic Info
Statistics
  • Stars: 18
  • Watchers: 6
  • Forks: 3
  • Open Issues: 14
  • Releases: 8
Topics
conversions rest-api tomcat xml
Created over 4 years ago · Last pushed 5 months ago
Metadata Files
Readme Contributing License Citation

README.md

TEIGarage

Build Status GitHub license GitHub release Docker fair-software.eu OpenSSF Best Practices NFDI4C Registry DOI

Table of Contents

About

TEIGarage is a webservice and RESTful service to transform, convert and validate various formats, focussing on the TEI format. TEIGarage is based on the proven OxGarage.

Further information on the code structure of MEIGarage and TEIGarage can be found here. Information in form of presentation slides and posters can be found here.

A running instance of TEIGarage can be found at teigarage.tei-c.org.

How to use

Open API documentation can be found at https://github.com/TEIC/TEIGarage/blob/main/src/main/webapp/openapi.json or at the running instance https://teigarage.tei-c.org/ege-webservice/. A curl example call to the API to convert an existing .docx to a TEI file looks like

curl -o output.xml -F upload=@input.docx https://teigarage.tei-c.org/ege-webservice/Conversions/docx%3Aapplication%3Avnd.openxmlformats-officedocument.wordprocessingml.document/TEI%3Atext%3Axml/

Installation

Installing with Docker

With Docker installed, a readymade image can be fetched from the GitHub Container Registry or from DockerHub.

docker pull ghcr.io/teic/teigarage:latest

bash docker run --rm \ -p 8080:8080 \ -e WEBSERVICE_URL=http://localhost:8080/ege-webservice/ \ --name teigarage ghcr.io/teic/teigarage

Once it's running, you can point your browser at http://localhost:8080 for the graphical user interface and http://localhost:8080/ege-webservice` for the webservice.

You can also get the development version from DockerHub using docker pull teic/teigarage:dev.

available parameters

  • WEBSERVICE_URL : The full URL of the RESTful web service. This is relevant for the web client (aka the GUI) if you are running the docker container on a different port or with a different URL.

  • -v Stylesheet paths : The local path to the stylesheets and sources can be mounted to /usr/share/xml/tei/ using the --volume parameter, using e.g. -v /your/path/to/Stylesheets:/usr/share/xml/tei/stylesheet \ -v /your/path/to/TEI/P5:/usr/share/xml/tei/odd

TEI sources and stylesheets

When the docker image is build, the latest releases of the TEI Sources and Stylesheets are added to the image.

If you want to use another version of the sources or stylesheets, you can mount the local folders where your custom files are located when running the Docker image.

There are several ways to obtain these (see "Get and install a local copy" at http://www.tei-c.org/Guidelines/P5/), one of them is to download the latest release of both TEI and Stylesheets from GitHub. Then, the Stylesheets' root directory (i.e. which holds the profiles directory) must be mapped to /usr/share/xml/tei/stylesheet whereas for the P5 sources you'll need to find the subdirectory which holds the file p5subset.xml and map this to /usr/share/xml/tei/odd; (should be xml/tei/odd).

The respective git repositories:

| location in docker image | data located there | | --------------- | --------------- | | /usr/share/xml/tei/stylesheet | https://github.com/TEIC/Stylesheets/releases/latest | | /usr/share/xml/tei/odd | https://github.com/TEIC/TEI/releases/latest |

Using your local folders for the TEI sources and stylesheets:

bash docker run --rm \ -p 8080:8080 \ -e WEBSERVICE_URL=http://localhost:8080/ege-webservice/ \ -v /your/path/to/tei/stylesheet:/usr/share/xml/tei/stylesheet \ -v /your/path/to/tei/odd:/usr/share/xml/tei/odd \ --name teigarage ghcr.io/teic/teigarage

You can also change the version that is used by supplying different version number when building the image locally running something like

bash docker build \ --build-arg VERSION_STYLESHEET=7.52.0 \ --build-arg VERSION_ODD=4.3.0 \ .

in your local copy of the TEIGarage.

exposed ports

The Docker image exposes two ports, 8080 and 8081. If you're running TEIGarage over plain old HTTP, use the 8080 connector. For HTTPS connections behind a SSL terminating Load Balancer, please use the 8081 connector.

Installing without Docker

Getting the application packages

The latest released application package (WAR file) is available from the TEIGarage release page. The latest dev version can be downloaded via nightly.link from the GitHub Action at nightly.link/TEIC/TEIGarage/workflows/maven_docker/main/artifact.zip.

The war file could also be build locally, see Building with Maven.

Running the application packages

Using a running Tomcat (or similar container), you can install the WAR file (see above) in the usual way. In this case, you will need to do some configuration manually:

  1. copy the file TEIGarage/WEB-INF/lib/oxgarage.properties to /etc/oxgarage.properties
  2. create a directory /var/cache/oxgarage and copy the file log4j.xml to there
  3. make the directory owned by the Tomcat user, so that it can create files there: eg chown -R tomcat6:tomcat6 /var/cache/oxgarage
  4. make sure the TEI stylesheets and source are installed at /usr/share/xml/tei using the Debian file hierarchy standard; the distribution files mentioned in the TEI sources and stylesheets are in the correct layout.

You'll probably need to restart your servlet container to make sure these changes take effect.

Edit the file oxgarage.properties if you need to change the names of directories.

Check the working system by visiting /ege-webclient/ on your Tomcat (or similar) server, and trying an example transformation. You can check the RESTful web server using e.g. Curl. For example, to convert a TEI file to Word docx format, you might do

bash curl -s -o test.docx -F upload=@test.xml http://localhost:8080/ege-webservice/Conversions/TEI%3Atext%3Axml/docx%3Aapplication%3Avnd.openxmlformats-officedocument.wordprocessingml.document

Building with Maven

The TEIGarage Java project can be built with Maven using

mvn -B package --file pom.xml

Readymade .war files can be downloaded from the GitHub Action using nightly.link. For the required Java version see: https://github.com/TEIC/TEIGarage/blob/48726dd73a49b1c284d174dc68c26e6fe9cdb03d/.github/workflows/maven_docker.yml#L21

dependencies

The dependencies needed for the Maven build that are not available at the main Maven repository are available through GitHub Packages at the TEIC and Edirom GitHub organizations. While those packages are public, GitHub authentication is needed to access those packages.

To authenticate when building locally, create a GitHub PAT with the read:packages scope. Create a maven settings file or edit an existing one and add it to your .m2 folder (e.g. at /home/name/.m2)

```xml

github

github central https://repo1.maven.org/maven2 githubtei https://maven.pkg.github.com/TEIC/* true

githubtei YOURGITHUBUSERNAME YOURGITHUBPAT

```

Owner

  • Name: Text Encoding Initiative Consortium
  • Login: TEIC
  • Kind: organization
  • Email: council@tei-c.org
  • Location: International

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Parkoła"
  given-names: "Tomasz"
- family-names: "Stanisławczyk"
  given-names: "Mariusz"
- family-names: "Cummings"
  given-names: "James"
- family-names: "Burnard"
  given-names: "Lou"
- family-names: "Rahtz"
  given-names: "Sebastian"  
- family-names: "Werla"
  given-names: "Marcin"  
- family-names: "Mittelbach"
  given-names: "Arno"
- family-names: "Cayless"
  given-names: "Hugh"
- family-names: "Viglianti"
  given-names: "Raffaele"
- family-names: "Röwenstrunk"
  given-names: "Daniel"
- family-names: "Stadler"
  given-names: "Peter"
- family-names: "Ferger"
  given-names: "Anne"
title: "TEIGarage"
version: 1.2.4
date-released: 2025-04-14
url: "https://github.com/TEIC/TEIGarage"

GitHub Events

Total
  • Issues event: 6
  • Watch event: 5
  • Delete event: 25
  • Issue comment event: 24
  • Push event: 28
  • Pull request review event: 2
  • Pull request event: 69
  • Fork event: 2
  • Create event: 29
Last Year
  • Issues event: 6
  • Watch event: 5
  • Delete event: 25
  • Issue comment event: 24
  • Push event: 28
  • Pull request review event: 2
  • Pull request event: 69
  • Fork event: 2
  • Create event: 29

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 5
  • Total pull requests: 29
  • Average time to close issues: 6 days
  • Average time to close pull requests: 14 days
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 0.2
  • Average comments per pull request: 0.28
  • Merged pull requests: 18
  • Bot issues: 0
  • Bot pull requests: 26
Past Year
  • Issues: 5
  • Pull requests: 29
  • Average time to close issues: 6 days
  • Average time to close pull requests: 14 days
  • Issue authors: 3
  • Pull request authors: 3
  • Average comments per issue: 0.2
  • Average comments per pull request: 0.28
  • Merged pull requests: 18
  • Bot issues: 0
  • Bot pull requests: 26
Top Authors
Issue Authors
  • peterstadler (4)
  • raffazizzi (3)
  • Dominique-M (1)
  • teistudy (1)
  • SebastianKohler (1)
  • anneferger (1)
Pull Request Authors
  • dependabot[bot] (54)
  • anneferger (4)
  • maibataya5 (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (54) java (25)

Dependencies

pom.xml maven
  • commons-fileupload:commons-fileupload 1.4 compile
  • javax.servlet:javax.servlet-api 4.0.1 compile
  • pl.psnc.dl.ege.tei:tei-converter 0.6.4 compile
  • pl.psnc.dl.ege.validator:ege-validator 0.4.2 compile
  • pl.psnc.dl.ege:ege-framework 0.5.1 compile
  • pl.psnc.dl.ege:ege-xsl-converter 0.5.1 compile
  • uk.ac.ox.oucs.oxgarage.oo:oo-converter 1.1.2 compile
  • io.swagger.core.v3:swagger-jaxrs2 2.2.0
  • io.swagger.core.v3:swagger-jaxrs2-servlet-initializer-v2 2.2.0
  • javax.ws.rs:javax.ws.rs-api 2.1
  • org.json:json 20211205
.github/workflows/maven_docker.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-java v3 composite
  • actions/upload-artifact v3 composite
  • docker/build-push-action v3 composite
  • docker/login-action v2 composite
  • docker/metadata-action v4 composite
  • peter-evans/dockerhub-description v3 composite
  • s4u/maven-settings-action v2.7.0 composite
Dockerfile docker
  • tomcat 9-jdk11-openjdk build
.github/workflows/codeql.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/init v2 composite
  • s4u/maven-settings-action v2.7.0 composite
.github/workflows/fair-software.yml actions
  • fair-software/howfairis-github-action 0.2.1 composite