Commit 207c5cb9 authored by Elisa Nury's avatar Elisa Nury
Browse files

Update documentation/documentation-grammateus-app.md

parent 0aabd592
......@@ -7,7 +7,6 @@
* [Modules](#modules)
* [Resources](#resources)
* [Templates](#templates)
3. [Database Management](#database-management)
## Introduction
......@@ -62,34 +61,74 @@ In the Data folder are stored all the TEI XML files:
The `config.xqm` and `view.xql` modules come by default with the eXist app. Modules must be added to the `view.xql` for the controller to apply HTML [templating](https://exist-db.org/exist/apps/doc/templating). The other modules were created specifically for grammateus.
**app**
The app module contains most templating function for the website, for instance the about page, the introduction, the typology page with descriptions and classification. This module deals with functions of the bibliography, and the page for displaying results from a general search using the searchbox on the top right corner of the website. It also sets the page title, a function that is called from the [template](#templates) HTML page.
**search-facets**
This module contains the template for the `papyri.html` page and all functions related to searching the papyri in the database.
**show**
This modules has the template and function for displaying a single papyrus with metadata, a representation of the papyrus in SVG, and eventually an image displayed with Mirador for the papyri that are available with IIIF, e.g. TM 12902.
Among the metadata, the Provenance and Century are accessed directly from papyri.info, so as to have the most up-to-date information.
The `show:svg` function for [SVG display](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/master/app/modules/show.xql#L225-314) is the most complex part of the page, and the one constantly raising new problems, as it is an important project requirement to access the text dynamically from papyri.info. Because of that requirement, we cannot store a normalized version of the text, but have to deal with the relatively high level of variation in encodings.
The `show:svg` function for [SVG display](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/9102c0ff707cca5988a6d70591ad7835f508df81/app/modules/show.xql#L225-314) is the most complex part of the page, and the one constantly raising new problems, as it is an important project requirement to access the text dynamically from papyri.info. Because of that requirement, we cannot store a normalized version of the text, but have to deal with the relatively high level of variation in encodings.
**gramm**
In the gramm module there are functions to use across the other modules. For instance:
- getting general information about a papyrus [:link:](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/9102c0ff707cca5988a6d70591ad7835f508df81/app/modules/gramm.xql#L51-87)
- getting external data, from papyri.info [:link:](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/9102c0ff707cca5988a6d70591ad7835f508df81/app/modules/gramm.xql#L148-251)
- font awesome icons [:link:](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/9102c0ff707cca5988a6d70591ad7835f508df81/app/modules/gramm.xql#L89-146)
- place, shape and fibres [:link:](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/9102c0ff707cca5988a6d70591ad7835f508df81/app/modules/gramm.xql#L254-331)
- date functions [:link:](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/9102c0ff707cca5988a6d70591ad7835f508df81/app/modules/gramm.xql#L333-421)
- formatting the general search results [:link:](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/9102c0ff707cca5988a6d70591ad7835f508df81/app/modules/gramm.xql#L424-461)
- functions related to the typology [:link:](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/9102c0ff707cca5988a6d70591ad7835f508df81/app/modules/gramm.xql#L464-542)
**URI**
THe URI module gathers various URIs, either internal to the database or external (papyri.info, HGV).
### Resources
- css (bootstrap and custom css),
- javascript (jquery),
- fonts (fontawsome),
- xml (lucene index),
- xslt (epidoc)
**css**
There is the bootstrap css, `nouislider.css` for the date sliders on the papyri.html page, plus a custom `style.css` file.
**js**
We have bootstrap and jquery javascript, nouislider for the date sliders, and svg-pan-zoom for the papyrus display in svg. `grammateus.js` has custom javascript, in particular to solve problems with the display of several papyri, as some encoding difficulties prevent us from fully automating the creation of the display (e.g. we mostly display the recto of papyri and hide the verso text, but in a couple of cases we need to display the verso).
It should be noted that svg-pan-zoom is currently making the display too small for some papyri on Crome and Edge. An alternative solution should be found (see [issue](#64)).
**fonts**
We are using fontawesome for the icons.
**xml**
Here we have the lucene index configuration of the papyri folder. We keep it here for convenience, when updating the website on server.
**xslt**
The EpiDoc XSLT Stylesheet are used to convert the TEI transcriptions from papyri.info to an HTML display. The main change that we have included is how the lines are numbered, so as to be able to display the text sections (see [htm-teilb.xsl](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/9102c0ff707cca5988a6d70591ad7835f508df81/app/resources/xslt/epidoc/htm-teilb.xsl)). Another XSLT, [txt-sect.xslt](https://gitlab.unige.ch/papyri-dev/grammateus/-/blob/9102c0ff707cca5988a6d70591ad7835f508df81/app/resources/xslt/txt-sect.xslt), adds the text section to the HTML transcription.
`typologyToHTML` converts an XML TEI description into HTML, and `taxonomyToList` creates the typology display on the [typology page](https://grammateus.unige.ch/typology.html).
Finally, `sidebar.xslt` creates the sidebar for the description and classification pages.
**mirador**
We use the mirador viewer to display images available in IIIF. We are using mirador 2.0 and should upgrade to the latest version.
**img**
We keep a few logos and the three papyri images for the home page.
### Templates
Page template
There is a single page template, that sets the metadata, header and footer for every page on the website.
## Database Management
- Lucene & indexes
- Scheduled tasks?
- Upgrading exist
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment