Skip to content

Commit

Permalink
Merge branch 'develop' into 156-searchwindow-use-edition-path-for-col…
Browse files Browse the repository at this point in the history
…lection-function
  • Loading branch information
roewenstrunk authored Dec 2, 2024
2 parents eb5c7f4 + 1c1514f commit 100d077
Show file tree
Hide file tree
Showing 10 changed files with 720 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Refs #
<!--- Include details of your testing environment, and the tests you ran. -->

## Types of changes
<!--- What types of changes does your code introduce? Please DELETEE options that are not relevant. -->
<!--- What types of changes does your code introduce? Please DELETE options that are not relevant. -->
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to change)
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/fair-software.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: fair-software

on: push

jobs:
verify:
name: "fair-software"
runs-on: ubuntu-latest
steps:
- uses: fair-software/[email protected]
name: Measure compliance with fair-software.eu recommendations
env:
PYCHARM_HOSTED: "Trick colorama into displaying colored output"
with:
MY_REPO_URL: "https://github.com/${{ github.repository }}"
1 change: 1 addition & 0 deletions .howfairis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skip_registry_checks_reason : "registered in NFDI4Culture Registry for Tools & Services at https://nfdi4culture.de/id/E3648"
50 changes: 50 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Edirom Online
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Daniel
family-names: Röwenstrunk
- given-names: Peter
family-names: Stadler
- given-names: Benjamin W.
family-names: Bohl
- given-names: Nikolaos
family-names: Beer
- given-names: Kristin
family-names: Herold
- given-names: Daniel
family-names: Jettka
- given-names: Stefan
family-names: Münnich
- given-names: Dennis
family-names: Ried
- given-names: Dennis
family-names: Friedl
- given-names: Hizkiel
family-names: Alemayehu
identifiers:
- type: doi
value: 10.5281/zenodo.5347861
description: Edirom Online
repository-code: 'https://github.com/Edirom/Edirom-Online'
abstract: >-
Edirom Online is a software for the presentation and
analysis of critical musical editions in a digital format,
particularly in the fields of musicology and philology.
Edirom Online supports various data formats commonly used
in digital humanities, such as TEI (Text Encoding
Initiative) for textual data and MEI (Music Encoding
Initiative) for musical data, that is visualized with
Verovio. This allows for the integration of different data
formats, starting in the early days with texts, images and
music and adding audio and even film within a single
edition.
license: GPL-3.0
version: v1.0.0
date-released: '2024-11-20'
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
[![Build](https://github.com/Edirom/Edirom-Online/actions/workflows/pre-release.yml/badge.svg?branch=develop&event=push)](https://github.com/Edirom/Edirom-Online/actions/workflows/pre-release.yml) [![NFDI4C Registry](https://nfdi4culture.de/fileadmin/user_upload/registry/badges/nfdi4culturebadge.svg)](https://nfdi4culture.de/id/E3648) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
<div align="center">

[![Build](https://github.com/Edirom/Edirom-Online/actions/workflows/pre-release.yml/badge.svg?branch=develop&event=push)](https://github.com/Edirom/Edirom-Online/actions/workflows/pre-release.yml)
[![NFDI4C Registry](https://nfdi4culture.de/fileadmin/user_upload/registry/badges/nfdi4culturebadge.svg)](https://nfdi4culture.de/id/E3648)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
[![GitHub release](https://img.shields.io/github/v/release/Edirom/Edirom-Online.svg)](https://github.com/Edirom/Edirom-Online/releases)
[![FAIR checklist badge](https://fairsoftwarechecklist.net/badge.svg)](https://fairsoftwarechecklist.net/v0.2?f=31&a=32113&i=32300&r=133)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9746/badge)](https://www.bestpractices.dev/projects/9746)
[![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B%20%20%E2%97%8B%20%20%E2%97%8B-orange)](https://fair-software.eu)
[![DOI](https://zenodo.org/badge/5966814.svg)](https://zenodo.org/badge/latestdoi/5966814)

</div>


<div align="center">

**[Showcases](https://github.com/Edirom/Edirom-Online#showcases)
[Get started](https://github.com/Edirom/Edirom-Online#get-started)
[Documentation](https://github.com/Edirom/Edirom-Online#documentation)
[Dependencies](https://github.com/Edirom/Edirom-Online#dependencies)
[Roadmap](https://github.com/Edirom/Edirom-Online#roadmap)
[Contributing](https://github.com/Edirom/Edirom-Online#contributing)
Expand Down Expand Up @@ -97,6 +110,13 @@ When you have your system prepared with all Sencha Cmd prerequisites or you have
* at `http://localhost:8080/exist/apps/dashboard/admin#` (signed-in) go to "Package Manager" then "Upload" and select the xar file which (supposed above build-method was used) was built at `/PATH_TO_LOCAL_EDIROM_EDITION_EXAMPLE_REPO/build/EditionExample-0.1.xar`
* in **eXist-db Package Manager** click on the "Edirom Online" entry - you will be directed to the running Edirom at `http://localhost:8080/exist/apps/Edirom-Online/index.html`

## Documentation

Some useful information regarding documentation is captured in the [docs] folder of this repo. It contains:
* [Customize] Edirom Online and content
* Edirom Online – [Release Workflow]
* [Setup Edirom Online] on a local machine

## Dependencies

Edirom Online depends heavily on the JavaScript framework [Ext JS] which is included in parts in our code base. We use Ext JS 4.2.1 in the GPL version. Edirom Online also includes the [Raphaël] javascript library (MIT License) and the [ACE] editor (BSD license).
Expand Down Expand Up @@ -133,6 +153,11 @@ Even if you are not ready (yet) to contribute to this wonderful project, maybe i

Please note that this project is released with a [Contributor Code of Conduct]. By participating in this project you agree to abide by its terms.

## Citation

Please cite the software/repository using the information provided under "Cite this repository" on the right hand side. The APA and BIBTeX citations are fed by information from the CITATION.cff file in this repository which you can also use as a source.
If you intend to cite unreleased branches or commits please use the commit hash in the citation.

## License

Edirom Online is released to the public under the terms of the [GNU GPL v.3] open source license.
Expand All @@ -152,6 +177,10 @@ Edirom Online is released to the public under the terms of the [GNU GPL v.3] ope
[Bargheer: Edition]: https://github.com/Edirom/Bargheer-Edition
[eXist-db]: https://exist-db.org/
[Verovio]: https://www.verovio.org/index.xhtml
[docs]: /docs
[Customize]: docs/customize.md
[Release Workflow]: docs/release-workflow.md
[Setup Edirom Online]: docs/setup.md
[Ext JS]: https://www.sencha.com/products/extjs
[Raphaël]: http://raphaeljs.com
[ACE]: http://ace.ajax.org
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<import file="${basedir}/.sencha/app/build-impl.xml"/>
<import file="${basedir}/testing/ant-tests.xml"/>

<property name="project.version" value="1.0.0-beta.6"/>
<property name="project.version" value="1.0.0-beta.7"/>
<property name="project.app" value="Edirom-Online"/>
<property name="project.title" value="Edirom Online"/>
<property name="repo.target" value="${project.app}"/>
Expand Down
177 changes: 177 additions & 0 deletions docs/customize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Customize Edirom Online and content

- [Customize Edirom Online](#customize-edirom-online)
* [Annotations](#annotations)
* [CSS](#css)
* [Image server](#image-server)
* [Topbar](#topbar)
* [Welcome window](#welcome-window)
- [Customize content](#customize-content)
* [SVG overlays](#svg-overlays)
* [Windows](#windows)
- [Links](#links)
* [Links to XML in the eXist-database](#links-to-xml-in-the-exist-database)
* [Links from outside Edirom Online](#links-from-outside-edirom-online)
* [JS](#js)


# Customize Edirom Online

## Annotations
change the **layout** for annotations (3 are predefined), using predefined preferences
* `<entry key="annotation_layout" value="EdiromOnline.view.window.annotationLayouts.AnnotationLayout1"/>`

## CSS
Add a **custom CSS file**, using predefined preferences
* `<entry key="additional_css_path" value="xmldb:exist:///db/apps/baudiData/editions/baudi-14-2b84beeb/edirom/css/style.css"/>`

## Image server ###
**switch the image server** from digilib to openseadragon (IIIF), using predefined preferences
* `<entry key="image_server" value="openseadragon"/>`

## Topbar
change the **logo** of the edition
* edit [`app/view/desktop/TopBar.js`](https://github.com/Edirom/Edirom-Online/blob/f8abab67bd86cb055859be8fdb9965602477e854/app/view/desktop/TopBar.js#L72)
* then edit [`Edirom-Online/packages/eoTheme/sass/var/button/Button.scss`](https://github.com/Edirom/Edirom-Online/blob/f8abab67bd86cb055859be8fdb9965602477e854/packages/eoTheme/sass/var/button/Button.scss#L215)

de/activate **search**
* un/comment [`Edirom-Online/app/view/desktop/TopBar.js`](https://github.com/Edirom/Edirom-Online/blob/f8abab67bd86cb055859be8fdb9965602477e854/app/view/desktop/TopBar.js#L84)

de/activate **work switch**
* un/comment [`Edirom-Online/app/view/desktop/TopBar.js`](https://github.com/Edirom/Edirom-Online/blob/f8abab67bd86cb055859be8fdb9965602477e854/app/view/desktop/TopBar.js#L82)

## Welcome window
**define** a welcome window
* `<entry key="start_documents_uri" value="xmldb:exist:///db/apps/baudiData/editions/baudi-14-2b84beeb/edirom/introduction.xml"/>`

# Customize content

## SVG overlays
Edirom Online offers the possibility to add SVG overlays to source images that can be switched on and off dynamically. Defining such an overlay requires two steps.

**Add SVGs to facsimile**

You have to add the SVG to be displayed as overlay of a page to the respective mei:surface in the mei:facsimile tree, e.g.:

```
<music>
<facsimile>
<surface xml:id="edirom_surface_2fcc4e06-393d-4444-91e7-642b910773cd" n="1">
<svg xmlns="http://www.w3.org/2000/svg" xml:id="overlay1_1" version="1.1" width="4911" height="1716" viewBox="0 0 4911 1716">
<defs id="defs2989"/>
<rect x="1057" y="40" width="100" height="100" rx="1093" ry="90" id="rect2995" style="opacity:0.3;fill:#ffe680" onclick="loadLink('xmldb:exist://db/contents/edition-74338556/texts/comment_sinfonia.xml',{})"/>
</svg>
...
</surface>
</facsimile>
</music>
```

Please be aware, that Edirom does not provide a tool for generating theses SVGs, you have to use any appropriate image editing software, simple SVGs can easily be created in the XML directly, though. There are several issues that You should take care when creating the SVG.

1. The SVG element has to have an @xml:id in order to associate it with the layer definition. Otherwise it will not be displayed when the layer is being switched on in the Source-View.
2. The SVG should have the exact same proportions as the image file of the page on which it is to be displayed. The easiest way is to give it the exact same pixel dimensions, both in the @widht and @height attributes, and in the @viewbox attribute.
A feature currently under development is adding interactivity to SVG shapes. When ready this will allow to add the @onclick attribute to a shape that could trigger, e.g. loading some Ediron Online content in a new window (see above example).

**Define overlay**

In order to have the overlay displayed as option in a sources's View-Menu resp. Layers-Menu a mei:annot has to be defined in the mei:notesStmt, e.g.

```
<notesStmt>
<annot type="overlay" xml:id="overlay1" plist="#overlay1_1 #overlay1_68">
<title>Title to be shown in Menu</title>
</annot>
</notesStmt>
```

The mei:annot has to be conform to the following issues:
1. @type="overlay"
2. @xml:id has to be present
3. @plist has to contain IDREFs to all SVG elements in the source that shall be associated with the corresponding entry in the View-Menu, i.e. the SVG elements of all facsimile surfaces that shall be displayed when the layer is set visible. Of course the overlay will only display the SVG associated with the source-page currently displayed.

## Windows

**dimensions of content windows**: when opened e.g. from the Navigator, window height is set to the max. desktop height, width is set to x% of the desktop's width. You can set the initial width of every content window by propagating it together with the calling link in the navigator in [edition].xml:
* `<navigatorItem xml:id="navItem-1" sortNo="1 targets="xmldb:exist:///db/contents/PathToYourSourcesFolder/source.xml[width:500]">
<names>
<name>Score</name>
</names>
</navigatorItem>`


# Links

## Links to XML in the eXist-database

These xmldb-uris are generally used by Edirom Online to open contents.

**Link to source**
* opening default view: `xmldb:exist:///ABSOLUTE-PATH-TO-RESOURCE`, e.g. `xmldb:exist:///db/contents/edition-12345678/sources/source1.xml`

**Open a specified location in the source**
* `xmldb:exist:///ABSOLUTE-PATH-TO-RESOURCE#XML-ID`
* e.g., a page `xmldb:exist:///db/contents/edition-12345678/sources/source1.xml#edirom_surface_87c87e5d-37bc-463d-9f13-6d2940472db2`
* e.g., a measure `xmldb:exist:///db/apps/contents/musicSources/freidi-musicSource_A.xml#A_mov0_measure11`
* to specify multiple resources, concatenate their xmldb URIs with `;`: `[xmldb-URI];[xmldb-URI]`

## Links from outside Edirom Online

**Link to Edirom Online**
* Depending on the domain of your deployment, the server setup etc. in a standard local server environment this might be: `http://localhost:8080/exist/apps/EdiromOnline/`
* Link to Edirom Online setting the active edition `http://localhost:8080/exist/apps/EdiromOnline?edition=[EDITION-ID]`
* Link to Edirom Online setting the active work `http://localhost:8080/exist/apps/EdiromOnline?work=[WORK-ID]` This will automatically also set the `activeEdition`.

**Link to Edirom Online opening a specified window/object**
* In addition to the above 'link to Edirom Online' use the `uri` parameter to supply a xmldb-uri ([see above](#Links-to-xml-in-the-exist-database)) to the database content that should be opened in Edirom Online, e.g.: `http://localhost:8080/exist/apps/EdiromOnline/?uri=xmldb:exist:///db/apps/contents/audioSources/freidi-recording_Janowski1994.xml`
* Edirom Online will open the objects in their respective default view and window size.

**Link to Edirom Online opening multiple specified windows/objects**
* As the above plus append additional resource-links separated by `;`, e.g.: `http://localhost:8080/exist/apps/EdiromOnline/?uri=xmldb:exist:///db/apps/contents/audioSources/freidi-recording_Janowski1994.xml;xmldb:exist:///db/apps/contents/librettoSources/freidi-librettoSource_KA-tx4.xml`

## JS

The function-handling links in Edirom Online are defined by the [app/controller/LinkController.js](https://github.com/Edirom/Edirom-Online/blob/develop/app/controller/LinkController.js) as follows:
```js
loadLink: function(uri, cfg){ ... }
```

The two parameters given are:
* **uri** any uri may be entered; nevertheless there are mechanisms for relative or absolute links and some special cases for certain 'protocols' such as 'edirom:' or 'xmldb:exist'
* **cfg** is an JS object containing various options for defining things such as opening a link in a new Edirom Online window or defining width of the openend window.

***Examples***

* open **object window** in default view with default parameters
```js
loadLink('xmldb:exist:///db/apps/contents/audioSources/freidi-recording_Janowski1994.xml',{});
```
* open **target element** in its default view (e.g. open a specific measure of a music source in measureBasedView)
```js
loadLink('xmldb:exist:///db/apps/contents/musicSources/freidi-musicSource_A.xml#A_mov0_measure11',{});
```
* open object window in default view with **defined window width**
```js
loadLink('xmldb:exist:///db/apps/contents/audioSources/freidi-recording_Janowski1994.xml',{width:'600px'});
```
* **Update a window** that’s already displaying a resource
* If the resource is not open in any window a new window will be opened
```js
window.parent.loadLink('xmldb:exist:///db/apps/contents/musicSources/freidi-musicSource_A.xml#A_mov0_measure11', {useExisting:true});
```
* If the resource is not open in any window, ignore the link
```js
window.parent.loadLink('xmldb:exist:///db/apps/contents/musicSources/freidi-musicSource_A.xml#A_mov0_measure11', {onlyExisting:true});
```
* Open **multiple resources**
```js
window.parent.loadLink('xmldb:exist:///db/apps/contents/audioSources/freidi-recording_Janowski1994.xml;xmldb:exist:///db/apps/contents/musicSources/freidi-musicSource_A.xml#A_mov0_measure11');
```
* Additionally sort the resources after they have been opened (at the moment this option only supports the `sortGrid` option)
```js
window.parent.loadLink('xmldb:exist:///db/apps/contents/audioSources/freidi-recording_Janowski1994.xml', {sort:’sortGrid'});
```
* If at the same instance windows that are already opened (array of window-objects) should be included in the sort. This is used with the "open all" Button in annotation windows to include the annotation window in the sort
```js
window.parent.loadLink('xmldb:exist:///db/apps/contents/audioSources/freidi-recording_Janowski1994.xml', {sort:’sortGrid’,sortIncludes:[win1,win2]});
```
Loading

0 comments on commit 100d077

Please sign in to comment.