LaBB-CAT is a linguistic annotation store server, implemented by the NZILBB.
The 'classic' legacy code is in the process of being deprecated and replaced by the code in this repository.
There currently three components here:
mvn package -pl :nzilbb.labbcat.server
- tests and builds target/nzilbb.labbcat.server-n.n.n.jarmvn package -pl :nzilbb.labbcat.server -Dmaven.test.skip
- builds target/nzilbb.labbcat.server-n.n.n.jar without running testsmvn site -pl :nzilbb.labbcat.server
- build javadoc/API documentation in docs.More documentation is available here
The user interface is broken into three angular apps
npm install -g @angular/cli
cd user-interface/src/main/angular
ng serve
The default app is labbcat-admin. To serve the view/edit apps,
use ng serve labbcat-view
or ng serve labbcat-edit
(respectively)
The user interface components are contain i18n
attributes for resources that require
translation to other languages. If changes are made, resource files can be generated for
translation by executing the following shell script:
./i18n.sh
This generates localization resources for all three app projects, and merges them
into a single file:
user-interface/src/main/angular/src/locale/messages.xlf
To localize to a new language/variety:
To deploy a production version of the user interface into a local installation of LaBB-CAT, execute the following shell script:
./deploy-user-interface.sh
The shell script assumed the location of the local LaBB-CAT instance is:\
/var/lib/tomcat9/webapps/labbcat
You can specify a different location as a command-line parameter, e.g.:
./deploy-user-interface.sh /opt/tomcat/webapps/labbcat
If you get an error something like:
[INFO] An unhandled exception occurred: The service was stopped: spawn /home/robert/nzilbb/labbcat-server/user-interface/target/angular/node_modules/@esbuild/linux-x64/bin/esbuild EACCES ... [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.1:npm (user-interface-view) on project nzilbb.labbcat.user-interface: Failed to run task: 'npm run build-labbcat-view' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127) -> [Help 1]
...it means that the esbuild command is not marked as executable on your system. To fix that:
chmod a+x user-interface/target/angular/node_modules/@esbuild/linux-x64/bin/esbuild
Requires Node and npm.
To build:
mvn package -pl :nzilbb.labbcat.wysiwiki
To deploy into LaBB-CAT:
cp wysiwiki/target/wysiwiki/* /var/lib/tomcat9/webapps/labbcat/wysiwiki/
To build the docker image:
docker build -t nzilbb/labbcat .
To release a new version of the docker image:
unzip -qc bin/labbcat.war version.txt
unzip -qc bin/labbcat.war version.txt
The image does not include a MySQL server, which can be supplied from the MySQL docker image:
docker run --name=labbcat-db \
-e MYSQL_DATABASE=labbcat -e MYSQL_USER=labbcat \
-e MYSQL_PASSWORD=secret \
-d mysql/mysql-server:5.6 \
--skip-log-bin --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
docker run -v /path/to/external/directory:/labbcat/files --name=labbcat --link labbcat-db -d -p 8888:8080 nzilbb/labbcat