Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/getAnnotationInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
bwbohl authored Jul 11, 2023
2 parents e4575c3 + 2fee0a4 commit 5fa8b6b
Show file tree
Hide file tree
Showing 21 changed files with 482 additions and 3,282 deletions.
46 changes: 22 additions & 24 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,31 +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
- name: Upload Artifacts
- name: Chekout repository
uses: actions/checkout@v3

- name: Get short sha
uses: benjlevesque/short-sha@v2.2
id: short-sha
with:
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

- name: Upload Artifacts to action run
if: github.repository == 'Edirom/Edirom-Online'
uses: actions/actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v3.1.2
with:
# The name that the artifact will be made available under
name: EdiromOnline_${{ github.ref }}.zip
name: EdiromOnline_${{ steps.short-sha.outputs.sha }}.zip
# The path to retrieve the artifact
path: build-xar/EdiromOnline*.xar
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
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

# 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'
48 changes: 29 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,57 @@

# General Guidelines

* do not combine code-linting and contet work in one commit
* 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 newline character
2. Close file with a newline character


# XQuery

## XQuery version
## 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 xyDoc-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
xquery version 3.1;
```

## Version Statement
### License Statement

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

## Module imports

1. declare namespaces
2. import module namespaces of registered modules
3. import module namespaces of custom modules
### File Header

* Sort all three alphabetically.
* Always use relative URIs for `import module namespace` statements that import for modules not registered with eXist-db.
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
### Declare variables

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

## Function declarations
### Function declarations

* functions have to be preceeded by a XQDoc code-block
* functions have to be preceded by an xqDoc comment

## Strings
### XQuery body

* escape with single upper straight quote
* Strings: escape with U+00027 APOSTROPHE: `'`
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
Loading

0 comments on commit 5fa8b6b

Please sign in to comment.