Commit 0aabd592 authored by Elisa Nury's avatar Elisa Nury
Browse files

Update documentation/documentation-grammateus-app.md

parent 9102c0ff
......@@ -2,8 +2,13 @@
## Contents
1. [Introduction](#introduction)
1. [App Content](#app-content)
1. [Database Management](#database-management)
2. [App Content](#app-content)
* [Data](#data)
* [Modules](#modules)
* [Resources](#resources)
* [Templates](#templates)
3. [Database Management](#database-management)
## Introduction
......@@ -36,11 +41,40 @@ We have also removed all links to shared resources (`$shared`), and replaced the
## App Content
Main: html pages, ...
Data => synchronisation with data folder.
In the app [main folder](../app) are located the HTML pages of the website. There you also find configuration files: `build.xml`, `expath-pkg.xml` and `repo.xml`.
There are two important scripts in the main folder:
- [database-update-data.xq](../app/database-update-data.xq), which loads new or updated data from a local folder into the database.
- [database-update-HGV.xq](../app/database-update-HGV.xq), which fetches the place and date of origin from HGV data on papyri.info. It is necessary to store this data in our database for indexing purposes, even if for each papyrus we display the most up-to-date information dynamically from papyri.info.
The rest of the app's content is divided into Data, Modules, Resources and Templates.
### Data
In the Data folder are stored all the TEI XML files:
- bibliographic references created from our [zotero group](https://www.zotero.org/groups/2288077/grammateus) with [zotero2bibl](https://gitlab.unige.ch/papyri-dev/zotero2bibl).
- texts for the introduction, descriptions of types of papyri and explanation of the classification of papyri into types of documents.
- papyri (one XML file per papyrus in the database), see also the [data documentation](documentation-grammateus-data.md) for more information on the creation and contents of these files.
- the [grammateus typology](../app/data/grammateus_taxonomy.xml).
- [authority lists](../app/data/authority_lists.xml).
- links to external resources such as texts and images.
### Modules
xquery files (search, show page, ...)
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.
**gramm**
### Resources
......@@ -51,14 +85,11 @@ xquery files (search, show page, ...)
- xslt (epidoc)
### Templates
Page and homepage templates
Page template
## Database Management
- Lucene & indexes
- Scheduled tasks?
- Upgrading exist
Other? Validation of code (not only xquery, but TEI, html, css etc.). Tests?
TODO:
Synchronization: import data + git folder. Run xquery file regularly to import new data (added or removed papyri/corrected metadata)
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