Skip to content

Commit

Permalink
Merge branch 'rel_100alpha'
Browse files Browse the repository at this point in the history
  • Loading branch information
bwbohl committed Mar 29, 2022
2 parents 44e299c + b876d9d commit 71dfd6c
Show file tree
Hide file tree
Showing 93 changed files with 130,331 additions and 94,748 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docker build PR

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

env:
DOCKER_IMAGE: bwbohl/sencha-cmd

jobs:

build:

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
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`

# 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'
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
Thumbs.db
/.sencha_backup
/build-xar
/build-temp
/build
/data
/tmp
*.xpr
*.xpr
local.properties
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openjdk64-1.8.0.282
11 changes: 11 additions & 0 deletions .sencha/workspace/sencha.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,14 @@ workspace.theme.dir=${workspace.packages.dir}/${args.themeName}
workspace.cmd.version=4.0.3.74

ext.dir=${workspace.dir}/ext

# Addition from nbeer, 2018-03-12
# Without this app build will fail because of some incompatibilities between
# sencha cmd (currently using 4.0.4.84), macOS Sierra/High Sierra (currently
# failing on macOS 10.13.3) and phantomjs.
#
# See also:
# https://www.sencha.com/forum/showthread.php?329305-PhantomJS-dies-on-MacOS-Sierra/page2
# This skips slicing which seems only to be needed for IE8/9 compatibility.

skip.slice=1
49 changes: 24 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
Edirom Online
=============
# Edirom Online

Table of contents
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.

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

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.
## Dependencies

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).

The software is still under high development and has to be seen as beta software.
## Contributing

### Building locally

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.

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)

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

Dependencies
------------
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.:

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

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

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).

Setup
-----
## Other deployment methods

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

License
-------
## License

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.

Expand Down Expand Up @@ -74,4 +73,4 @@ included in the application's javascript code build. By default, files in this
folder are mapped to the application's root namespace, 'EdiromOnline'. The
namespace to which files in this directory are matched is controlled by the
app.sass.namespace property in EdiromOnline/.sencha/app/sencha.cfg.
-->
-->
47 changes: 32 additions & 15 deletions add/controller.xql
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
xquery version "1.0";

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

declare variable $exist:path external;
declare variable $exist:resource external;

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

if ($exist:path eq "/") then
(: forward root path to index.xql :)
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<forward url="index.html"/>
</dispatch>
(:else if (starts-with($exist:path, "/data")) then
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<!--<redirect url="/exist/restxq{$exist:path}"/>-->
<forward servlet="RestXqServlet"/>
</dispatch>:)
else
(: everything else is passed through :)
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<cache-control cache="yes"/>
</dispatch>
let $langVal := eutil:getLanguage(request:get-parameter("edition", ""))

return
if ($exist:path eq "") then
(: forward missing / to / :)
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<redirect url="{request:get-uri()}/"/>
</dispatch>
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}"/>
</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">
<add-parameter name="lang" value="{$langVal}"/>
</forward>
</dispatch>
(:else if (starts-with($exist:path, "/data")) then
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<!--<redirect url="/exist/restxq{$exist:path}"/>-->
<forward servlet="RestXqServlet"/>
</dispatch>:)
else
(: everything else is passed through :)
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<cache-control cache="yes"/>
</dispatch>
Loading

0 comments on commit 71dfd6c

Please sign in to comment.