commit | 635d4f295b93f4cdb32d7e3f0d3961f39cd2c316 | [log] [tgz] |
---|---|---|
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | Wed Feb 21 13:56:26 2024 +0000 |
committer | Helge <stallkamp@ids-mannheim.de> | Tue Mar 05 14:35:31 2024 +0100 |
tree | 64ef271d677f17c78c1273e2ec2ccd57750f2584 | |
parent | ccf52937617c61b1c5821ec11c58d9f94b2937c1 [diff] |
Bump org.apache.maven.plugins:maven-shade-plugin from 3.5.1 to 3.5.2 (closes #105) Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.1 to 3.5.2. - [Release notes](https://github.com/apache/maven-shade-plugin/releases) - [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.1...maven-shade-plugin-3.5.2) Change-Id: I84a4dc5003e5b31ea98f58912a444474bebb9ebf --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-shade-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Change-Id: I309c74ce6c0a20c13c3d5d8c5e9f9d7242e0a73c
Kalamar-Plugin-Export is a web service that integrates in the plugin framework of Kalamar, to export matches for the KorAP Corpus Analysis Platform in various formats. Currently supported are RTF, CSV, and JSON.
Kalamar-Plugin-Export is meant to be a basic export plugin and should demonstrate and evaluate the plugin capabilities of Kalamar.
Java 8 (OpenJDK or Oracle JDK), Git, Maven 3. Further dependencies are resolved using Maven.
To build the latest version of Kalamar-Plugin-Export, do ...
$ git clone https://github.com/KorAP/Kalamar-Plugin-Export $ cd Kalamar-Plugin-Export
... and build the jar file ...
$ mvn clean package
Afterwards the jar file is located in the target/
folder and can be started with ...
$ java -jar KalamarExportPlugin-[VERSION].jar
Per default, this will start a server at http://localhost:7777
. It will also create a subfolder files
to temporarily store created exports.
Registration of the plugin in Kalamar is not yet officially supported. Registration works by passing the following JSON blob to the plugin registration handler.
{ "name" : "Export", "desc" : "Exports Kalamar results", "embed" : [{ "panel" : "result", "title" : "exports KWICs and snippets", "icon" : "\uf019", "classes" : ["button-icon", "plugin" ], "onClick" : { "action" : "addWidget", "template" : "http://localhost:7777/export", "permissions":["forms","scripts","downloads"] } }] }
The simplest way to do this at the moment is by storing the json blob in a file (the blob needs to be in a list, i.e. surrounded by [...]
). The file then can be loaded using the Plugins
addon in Kalamar using the Kalamar configuration file.
{ Kalamar => { plugins => ['Plugins'], }, 'Kalamar-Plugins' => { default_plugins => 'plugins.json' } }
For example, with this configuration addition, the content of plugins.json
will be registered on every Kalamar page load.
An example demo showcases the embedded plugin.
At the moment the integration reuses the session of the host service. To make this possible, the Content Security Policy of Kalamar needs to be extended to include the whole domain that hosts both services (at the moment it's not possible to host the service on a different domain). If the domain is, e.g., ids-mannheim.de
, the configuration in the Kalamar configuration file needs to be:
{ CSP => { 'frame-src' => 'self', 'frame-ancestors' => ['self','https://*.ids-mannheim.de/'] } }
The basic configuration file is stored in src/main/resources/exportPlugin.conf
. To change the configuration create a new config file and run the jar with the according filename as argument:
$ java -jar KalamarExportPlugin-[VERSION].jar myconf_exportPlugin.conf
Alternatively a file named exportPlugin.conf
can be stored in the same directory as the java jar.
Copyright (c) 2020-2023, IDS Mannheim, Germany
Kalamar-Plugin-Export is developed as part of the KorAP Corpus Analysis Platform at the Leibniz Institute for the German Language (IDS).
Kalamar-Plugin-Export is published under the BSD-2 License.