Skip to content

Commit

Permalink
Merge branch 'develop' into ftr/measure-label-handling
Browse files Browse the repository at this point in the history
# Conflicts:
#	add/data/xql/getMeasures.xql
  • Loading branch information
riedde committed Feb 7, 2024
2 parents e59e582 + 706d3ab commit 3911b17
Show file tree
Hide file tree
Showing 57 changed files with 1,421 additions and 3,942 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
labels:
- 'gh actions dependencies'
47 changes: 25 additions & 22 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Docker build PR
name: Build

on:
# push:
# branches: [ main ]
push:
branches: [ develop ]
pull_request:
types: [opened, edited, reopened]
types: [ opened, synchronize, reopened ]
branches: [ develop, main ]

env:
Expand All @@ -13,26 +13,29 @@ env:
jobs:

build:

name: Build Edirom Online
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build Edirom Online from ${{ GITHUB_REF }}
run: docker run --rm -v `pwd`:/app -w /app --entrypoint ./build.sh bwbohl/sencha-cmd
- uses: actions/upload-artifact@v2
- name: Chekout repository
uses: actions/checkout@v4

- name: Get short sha
uses: benjlevesque/[email protected]
id: short-sha
with:
name: EdiromOnline_${{ GITHUB_REF }}.zip
path: build-xar/EdiromOnline*.xar
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
length: 7

- name: Build Edirom Online from ${{ github.ref }} at ${{ github.sha }}
run: docker run --rm -v $(pwd):/app -w /app --entrypoint ./build.sh bwbohl/sencha-cmd

# deploy:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: deploy
# uses: jaapio/keelsh-deploy@master
# with:
# keelBaseUrl: http://keel.euryanthe.de
# image: 'bazga/existdb'
# tag: 'latest'
- name: Upload Artifacts to action run
if: github.repository == 'Edirom/Edirom-Online'
uses: actions/[email protected]
with:
# The name that the artifact will be made available under
name: EdiromOnline_${{ steps.short-sha.outputs.sha }}.zip
# The path to retrieve the artifact
path: ${{ github.workspace }}/build-xar/Edirom-Online-*.xar
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
#optional retention-days: 1 to 90
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Thumbs.db
/tmp
*.xpr
local.properties
.idea/
89 changes: 89 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Edirom Online Contributing Guidelines

# General Guidelines

* do not combine code-linting and content work in one commit

## Whitespace handling

1. Use whitespaces, not tabs to indent code
2. Close file with a newline character


# XQuery

## xqDoc

We use [xqDoc](https://xqdoc.org) for documenting the XQueries in this repository. Please refer to the section [xqDoc Comments](https://xqdoc.org/xqdoc_comments_doc.html) of the xqDoc-website for details on formatting the documentation comment blocks.

* XQuery modules must have a library module xqDoc comment preceding the module declaration.
* Function declarations must have a library module xqDoc function comment preceding the function.

## XQuery document structure

### XQuery version

```xquery
xquery version 3.1;
```

### License Statement

```xquery
(:
For LICENSE-Details please refer to the LICENSE file in the root directory of this repository.
:)
```

### File Header

1. `declare namespace` statements
* sort alphabetically by prefix
2. `import module namespace` statements of registered modules
* sort alphabetically by prefix
3. `import module namespace` statements of custom modules
* sort alphabetically by prefix
* Always use relative URIs for `import module namespace` statements that import for modules not registered with eXist-db.

### Declare variables

* Use `declare variable` statements for all required external parameters

### Function declarations

* functions have to be preceded by an xqDoc comment

### XQuery body

* Strings: escape with U+00027 APOSTROPHE: `'`


# Javascript

## AJAX calls

The class `EdiromOnline.controller.AJAXController` provides a central method `doAJAXRequest` for performing AJAX requests. The method is provided globally as `window.doAJAXRequest`.

`doAJAXRequest` takes the following arguments:

* `url`: The URL of the requestet site or end point.
* `method`: The HTTP method like `PUT`, `GET`, `POST`.
* `params`: An object containing key-value-pairs of parameters for the request.
* `successFn`: A callback function which is called when the AJAX request was successfull.
* `retryNo`: The number of retries, if the requests fails. Standard is 2 retries.
* `async`: Defines the async parameter for AJAX calls. Default is 'true'.

An example of using the function would be:

```javascript
window.doAJAXRequest('data/xql/getAnnotationMeta.xql',
'GET',
{
uri: uri,
lang: lang
},
Ext.bind(function(response){
view.setMeta(response.responseText);
}, this)
);
```
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build](https://github.com/Edirom/Edirom-Online/actions/workflows/docker-ci.yml/badge.svg?branch=develop&event=push)](https://github.com/Edirom/Edirom-Online/actions/workflows/docker-ci.yml)

# Edirom Online

Edirom Online is a web application written in XQuery and JavaScript, and designed for deployment in [eXist-db](https://exist-db.org/). It is based on the work of the [_Edirom_-Project](https://edirom.de/edirom-projekt/) that originally was funded by the German Research Foundation (DFG). This software brings paperbased historio-critical editions of music texts to the web.
Expand Down
6 changes: 4 additions & 2 deletions add/controller.xql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
xquery version "1.0";
xquery version "3.1";

import module namespace edition="http://www.edirom.de/xquery/edition" at "data/xqm/edition.xqm";
import module namespace eutil = "http://www.edirom.de/xquery/util" at "data/xqm/util.xqm";

declare variable $exist:path external;
Expand All @@ -20,12 +21,13 @@ return
else if ($exist:path eq "/") then
(: redirect root path to index.html :)
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<redirect url="index.html?lang={$langVal}"/>
<redirect url="index.html"/>
</dispatch>
else if ($exist:path eq "/index.html") then
(: forward index.html to index.xql :)
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<forward url="index.xql">
<set-header name="Set-Cookie" value="edirom-language={$langVal}" />
<add-parameter name="lang" value="{$langVal}"/>
</forward>
</dispatch>
Expand Down
35 changes: 35 additions & 0 deletions add/data/locale/edirom-lang-de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,40 @@
<entry key="Bar_n" value="Takt {0}"/>
<!-- XSL-FO specific -->
<entry key="contentsWord" value="Inhaltsverzeichnis"/>

<!-- PERFORMANCE MEDIUM -->
<entry key="perfMedium.perfRes.voice" value="Singstimme"/>
<entry key="perfMedium.perfRes.voiceSpeaking" value="Sprechstimme"/>
<entry key="perfMedium.perfRes.voiceHigh" value="Hohe Stimme"/>
<entry key="perfMedium.perfRes.voiceMiddle" value="Mittlere Stimme"/>
<entry key="perfMedium.perfRes.voiceLow" value="Tiefe Stimme"/>
<entry key="perfMedium.perfRes.soprano" value="Sopran"/>
<entry key="perfMedium.perfRes.alto" value="Alt"/>
<entry key="perfMedium.perfRes.tenor" value="Tenor"/>
<entry key="perfMedium.perfRes.bass" value="Bass"/>

<entry key="perfMedium.perfRes.violin" value="Violine"/>
<entry key="perfMedium.perfRes.viola" value="Viola"/>
<entry key="perfMedium.perfRes.violoncello" value="Violoncello"/>
<entry key="perfMedium.perfRes.doubleBass" value="Kontrabass"/>
<entry key="perfMedium.perfRes.bassInstrumental" value="Bass (instrumental)"/>

<entry key="perfMedium.perfRes.flute" value="Flöte"/>
<entry key="perfMedium.perfRes.oboe" value="Oboe"/>
<entry key="perfMedium.perfRes.clarinet" value="Klarinette"/>
<entry key="perfMedium.perfRes.hornEnglish" value="Englischhorn"/>
<entry key="perfMedium.perfRes.bassoon" value="Fagott"/>

<entry key="perfMedium.perfRes.hornFrench" value="Horn"/>
<entry key="perfMedium.perfRes.trumpet" value="Trompete"/>
<entry key="perfMedium.perfRes.trombone" value="Posaune"/>
<entry key="perfMedium.perfRes.tuba" value="Tuba"/>

<entry key="perfMedium.perfRes.timpani" value="Pauken"/>
<entry key="perfMedium.perfRes.bells" value="Glocken"/>

<entry key="perfMedium.perfRes.harp" value="Harfe"/>
<entry key="perfMedium.perfRes.piano" value="Klavier"/>
<entry key="perfMedium.perfRes.organ" value="Orgel"/>
</entries>
</langFile>
35 changes: 35 additions & 0 deletions add/data/locale/edirom-lang-en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,40 @@
<entry key="Bar_n" value="Bar {0}"/>
<!-- XSL-FO specific -->
<entry key="contentsWord" value="Table of contents"/>

<!-- PERFORMANCE MEDIUM -->
<entry key="perfMedium.perfRes.voice" value="Voice (singing)"/>
<entry key="perfMedium.perfRes.voiceSpeaking" value="Voice (speaking)"/>
<entry key="perfMedium.perfRes.voiceHigh" value="High Voice"/>
<entry key="perfMedium.perfRes.voiceMiddle" value="Middle Voice"/>
<entry key="perfMedium.perfRes.voiceLow" value="Low Voice"/>
<entry key="perfMedium.perfRes.soprano" value="Soprano"/>
<entry key="perfMedium.perfRes.alto" value="Alto"/>
<entry key="perfMedium.perfRes.tenor" value="Tenor"/>
<entry key="perfMedium.perfRes.bass" value="Bass"/>

<entry key="perfMedium.perfRes.violin" value="Violin"/>
<entry key="perfMedium.perfRes.viola" value="Viola"/>
<entry key="perfMedium.perfRes.violoncello" value="Violoncello"/>
<entry key="perfMedium.perfRes.doubleBass" value="Double Bass"/>
<entry key="perfMedium.perfRes.bassInstrumental" value="Bass (instrumental)"/>

<entry key="perfMedium.perfRes.flute" value="Flute"/>
<entry key="perfMedium.perfRes.oboe" value="Oboe"/>
<entry key="perfMedium.perfRes.clarinet" value="Clarinet"/>
<entry key="perfMedium.perfRes.hornEnglish" value="English Horn"/>
<entry key="perfMedium.perfRes.bassoon" value="Bassoon"/>

<entry key="perfMedium.perfRes.hornFrench" value="French Horn"/>
<entry key="perfMedium.perfRes.trumpet" value="Trumpet"/>
<entry key="perfMedium.perfRes.trombone" value="Trombone"/>
<entry key="perfMedium.perfRes.tuba" value="Tuba"/>

<entry key="perfMedium.perfRes.timpani" value="Timpani"/>
<entry key="perfMedium.perfRes.bells" value="Bells"/>

<entry key="perfMedium.perfRes.harp" value="Harp"/>
<entry key="perfMedium.perfRes.piano" value="Piano"/>
<entry key="perfMedium.perfRes.organ" value="Organ"/>
</entries>
</langFile>
Loading

0 comments on commit 3911b17

Please sign in to comment.