Skip to content

Commit 71dfd6c

Browse files
committed
Merge branch 'rel_100alpha'
2 parents 44e299c + b876d9d commit 71dfd6c

File tree

93 files changed

+130331
-94748
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+130331
-94748
lines changed

.github/workflows/docker-ci.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Docker build PR
2+
3+
on:
4+
# push:
5+
# branches: [ main ]
6+
pull_request:
7+
types: [opened, edited, reopened]
8+
branches: [ develop, main ]
9+
10+
env:
11+
DOCKER_IMAGE: bwbohl/sencha-cmd
12+
13+
jobs:
14+
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Build Edirom Online from ${{ GITHUB_REF }}
22+
run: docker run --rm -v `pwd`:/app -w /app --entrypoint ./build.sh bwbohl/sencha-cmd
23+
- uses: actions/upload-artifact@v2
24+
with:
25+
name: EdiromOnline_${{ GITHUB_REF }}.zip
26+
path: build-xar/EdiromOnline*.xar
27+
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
28+
29+
# deploy:
30+
# needs: build
31+
# runs-on: ubuntu-latest
32+
# steps:
33+
# - name: deploy
34+
# uses: jaapio/keelsh-deploy@master
35+
# with:
36+
# keelBaseUrl: http://keel.euryanthe.de
37+
# image: 'bazga/existdb'
38+
# tag: 'latest'

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
Thumbs.db
44
/.sencha_backup
55
/build-xar
6+
/build-temp
67
/build
78
/data
89
/tmp
9-
*.xpr
10+
*.xpr
11+
local.properties

.java-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
openjdk64-1.8.0.282

.sencha/workspace/sencha.cfg

+11
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,14 @@ workspace.theme.dir=${workspace.packages.dir}/${args.themeName}
3232
workspace.cmd.version=4.0.3.74
3333

3434
ext.dir=${workspace.dir}/ext
35+
36+
# Addition from nbeer, 2018-03-12
37+
# Without this app build will fail because of some incompatibilities between
38+
# sencha cmd (currently using 4.0.4.84), macOS Sierra/High Sierra (currently
39+
# failing on macOS 10.13.3) and phantomjs.
40+
#
41+
# See also:
42+
# https://www.sencha.com/forum/showthread.php?329305-PhantomJS-dies-on-MacOS-Sierra/page2
43+
# This skips slicing which seems only to be needed for IE8/9 compatibility.
44+
45+
skip.slice=1

README.md

+24-25
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
1-
Edirom Online
2-
=============
1+
# Edirom Online
32

4-
Table of contents
3+
Edirom Online is a web application written in XQuery and Javascript, and designed for deployment in eXist-db[http://exist-db.org/exist/apps/homepage/index.html](http://exist-db.org/exist/apps/homepage/index.html). 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.
54

6-
<ul>
7-
<li style="margin-top:0;margin-bottom:0;"><a href="#dependencies">Dependencies</a></li>
8-
<li style="margin-top:0;margin-bottom:0;"><a href="#setup">Setup</a></li>
9-
<li style="margin-top:0;margin-bottom:0;"><a href="#setupcontent">Setup Content</a></li>
10-
<li style="margin-top:0;margin-bottom:0;"><a href="#development">Development</a></li>
11-
<li style="margin-top:0;margin-bottom:0;"><a href="#license">License</a></li>
12-
</ul>
5+
The software is still under high development and has to be seen as beta software.
136

14-
Edirom Online is a web application written in XQuery and Javascript, based on the work of the _Edirom_-Project (<http://www.edirom.de>) funded by the German Research Foundation (DFG). This software brings paperbased historio-critical editions of musicians handwritings to the pc.
7+
## Dependencies
158

169
Edirom Online depends heavily on the javascript framework ExtJS (<http://www.sencha.com/products/extjs/>) which is included in parts in our code base. We use ExtJS 4.2.1 in the GPL version. Edirom Online also includes the Raphaël javscript library (<http://raphaeljs.com>, MIT License) and the ACE editor (<http://ace.ajax.org>, BSD license).
1710

18-
The software is still under high development and has to be seen as beta software.
11+
## Contributing
12+
13+
### Building locally
14+
15+
For building Edirom Online you need *Sencha Cmd* installed on your system. You might want to refer to the [Sencha Cmd System Setup](https://docs.sencha.com/cmd/7.5.0/guides/intro_to_cmd.html#intro_to_cmd_-_system_setup) section for more details.
16+
17+
Alternatively we recommend to use a container image for building, e.g. [bwbohl/sencha-cmd](https://github.com/bwbohl/sencha-cmd/pkgs/container/sencha-cmd)
1918

19+
```bash
20+
docker run --rm -it -v /ABSOLUTE/PATH/TO/YOUR/LOCAL/EDIROM-ONLINE/CLONE:/app --name ediBuild ghcr.io/bwbohl/sencha-cmd:latest
21+
```
2022

21-
Dependencies
22-
------------
23+
When you have your system preapared with all Sencha Cmd prerequisites or you have your docker container running you have to execute a sencha build command through calling the build script included in this repository with one of the sencha build-type options (please refer to [sencha app build reference](https://docs.sencha.com/cmd/guides/advanced_cmd/cmd_reference.html#advanced_cmd-_-cmd_reference_-_sencha_app_build) for details), either in your native shell or in the container shell, e.g.:
2324

24-
* Jetty Application Server (<http://www.eclipse.org/jetty/>), in the newest version
25-
* eXist-db (<http://www.exist-db.org>), in the newest version
26-
* Digilib (<http://digilib.sourceforge.net/>), in the newest version
27-
* Apache with mod_proxy (<http://httpd.apache.org/docs/current/mod/mod_proxy.html>)
25+
```bash
26+
./build.sh testing
27+
```
2828

29-
Install eXist-db and Digilib on different ports. We use Jetty as application server for Digilib, others should work, too.
29+
### Testing locally
3030

31+
It is essential to Test your modifications before committing or issuing a pull request. A recommended way is running a local eXist-db v5.3 container and deploying your local build of Edirom Online together with some test-data, e.g. the [Edirom Edition Example](https://github.com/Edirom/EditionExample).
3132

32-
Setup
33-
-----
33+
## Other deployment methods
3434

35-
Please see our documentation in the wiki section: https://github.com/Edirom/Edirom-Online/wiki
35+
Please see our documentation in the [wiki](https://github.com/Edirom/Edirom-Online/wiki).
3636

37-
License
38-
-------
37+
## License
3938

4039
Edirom Online is released to the public under the terms of the [GNU GPL v.3](<http://www.gnu.org/copyleft/gpl.html>) open source license.
4140

@@ -74,4 +73,4 @@ included in the application's javascript code build. By default, files in this
7473
folder are mapped to the application's root namespace, 'EdiromOnline'. The
7574
namespace to which files in this directory are matched is controlled by the
7675
app.sass.namespace property in EdiromOnline/.sencha/app/sencha.cfg.
77-
-->
76+
-->

add/controller.xql

+32-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,39 @@
11
xquery version "1.0";
22

3+
import module namespace eutil = "http://www.edirom.de/xquery/util" at "data/xqm/util.xqm";
4+
35
declare variable $exist:path external;
46
declare variable $exist:resource external;
57

68
declare option exist:serialize "method=xhtml media-type=application/xhtml+html";
79

8-
if ($exist:path eq "/") then
9-
(: forward root path to index.xql :)
10-
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
11-
<forward url="index.html"/>
12-
</dispatch>
13-
(:else if (starts-with($exist:path, "/data")) then
14-
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
15-
<!--<redirect url="/exist/restxq{$exist:path}"/>-->
16-
<forward servlet="RestXqServlet"/>
17-
</dispatch>:)
18-
else
19-
(: everything else is passed through :)
20-
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
21-
<cache-control cache="yes"/>
22-
</dispatch>
10+
let $langVal := eutil:getLanguage(request:get-parameter("edition", ""))
11+
12+
return
13+
if ($exist:path eq "") then
14+
(: forward missing / to / :)
15+
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
16+
<redirect url="{request:get-uri()}/"/>
17+
</dispatch>
18+
else if ($exist:path eq "/") then
19+
(: redirect root path to index.html :)
20+
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
21+
<redirect url="index.html?lang={$langVal}"/>
22+
</dispatch>
23+
else if ($exist:path eq "/index.html") then
24+
(: forward index.html to index.xql :)
25+
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
26+
<forward url="index.xql">
27+
<add-parameter name="lang" value="{$langVal}"/>
28+
</forward>
29+
</dispatch>
30+
(:else if (starts-with($exist:path, "/data")) then
31+
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
32+
<!--<redirect url="/exist/restxq{$exist:path}"/>-->
33+
<forward servlet="RestXqServlet"/>
34+
</dispatch>:)
35+
else
36+
(: everything else is passed through :)
37+
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
38+
<cache-control cache="yes"/>
39+
</dispatch>

0 commit comments

Comments
 (0)