Overview

TEIGarage is described as follows.

https://github.com/TEIC/TEIGarage/

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.

Trying It Out

You can try it out on the following page.

https://teigarage.tei-c.org/

We will use the “TEI Minimal” ODD file published at the following URL. This file is also used as one of the presets in Roma.

https://tei-c.org/Vault/P5/current/xml/tei/Exemplars/tei_minimal.odd

Download the above file.

Then, on the TEIGarage site, select “Compiled TEI ODD” for “Convert from” and “xHTML” for “Convert to,” and upload the downloaded ODD file using “Choose File.”

The downloaded HTML file can be viewed in a browser or similar application.

Incidentally, clicking “Show advanced options” displays the parameters as well as the URL used for the conversion.

Since the URL is encoded, decoding it yields the following.

https://teigarage.tei-c.org/ege-webservice/Conversions/ODDC:text:xml/TEI:text:xml/xhtml:application:xhtml+xml/conversion?properties=truetrueenfalsedefaulttruetrueenfalsedefault

Within the properties parameter, you can see the following XML description.

<c/o<<cnc/c/ovo<<<<<co<<<<<cnenppppponpppppovrvrrrrrnvrrrrrneseoooooveooooovrirppppperpppppesoseeeeerseeeeerinirrrrrsirrrrrsosotttttiotttttin>nyyyyyonyyyyyosnn>iiiiii>iiiiii>ndddddndddddd=====d=====e"""""e"""""xoooopxoooop=xxxxl=xxxxl"gggg."gggg.0aaaap1aaaap"rrrrs"rrrrs>aaaan>aaaanggggcggggceeee.eeee.....d....dggltlggltleeae.eeae.ttnxettnxeIOgtgIOgtgmn"Oemn"Oeal>n.al>n.gieltgieltennyeennyese<"ise<"i"I/>."I/>.>mpfp>mpfptarartararrgolorgolouepsfuepsfeseeieseei<"r<l<"r<l/>t/e/>t/eptypNptypNrr>rarr>raouomouompepepepee<ese<esr/r"r/r"tpt>tpt>yrydyryd>o>e>o>epfpfeaearurutltlytyt><><//pprrooppeerrttyy>>

Open API

By accessing the following, you can check the available options based on the Open API.

https://teigarage.tei-c.org/ege-webservice/

Let’s try the Conversions endpoint. Click the “Try it out” button.

The output-document-type field has a default value of “odt:application:vnd.oasis.opendocument.text,” but change it to “xhtml:application:xhtml+xml.”

As a result, you can download the converted HTML file.

This makes it possible to programmatically perform format conversions using the TEIGarage API without going through the UI provided at https://teigarage.tei-c.org/.

Summary

In this article, I explained how to use TEIGarage, using the generation of an HTML file from an ODD file as an example.

Generally, you can achieve the same thing through a GUI by using Roma, which is introduced in the following article.

However, since Roma also uses TEI Garage behind the scenes, I was impressed by the richness of the TEI ecosystem.

References

One of Roma’s configuration files is the following.

https://github.com/TEIC/romajs/blob/dev/src/utils/urls.js

eeeeeexxxxxxppppppR--SooooooOerrrrrrMTStttttttAEtIacccccccNGtuooooooEaisnnnnnnErctssssssDaottttttSgTmeETTDDPPTIUEEAARRHRIITTEEEdLGGAASSasAASSEEFtRROOTTOavAAUUSSLaGGRR__L(lEECCPLOpu__EEROW5ePLSSOCIssRO__TANuOCPLOTGbhTAROCIseOTOCOOOerCITALNNteOOOTL).LNCI==IOONi==LN''Enht''==teSXhttiEMte''p-RLtihtscVpgte'.IasatioCn'rp-rEdascgSg'./JeoVAS.raNOtguDNe/liVtRf-a/EocuPSr.l5Omot/Uar/cRtgPuCs'5rE/rSce:unrtr/exnmtl//xtmeli//tEexie/mopdlda'rs'

In addition to TEIGARAGE, the URL https://tei-c.org/Vault/ is used for DATASOURCES and PRESETS.

Accessing this URL displays the following archive page. It appears that the files available here are referenced as needed.

The following is a machine translation for reference.