Command line tools that are installed on the server can be integrated into RAMADDA with the Service Integration Framework. There are a number of examples at ramadda.org. All RAMADDA repositories (running the latest release) have their list of enabled services at https://ramadda.org/repository/services/list. To enable an installed service you need to specify one or more properties in a .properties file in your RAMADDA home directory that specify the location of the installed software.
PDF Thumbnails
Install the Ghostscript package to automatically generate a thumbnail image of the the page of a PDF file by setting the property:
service.gs=/path/to/bin/gs
If on Amazon AWS you can do:
sudo yum install ghostscript
To find out where GS is located do:
which gs
PDF Services
RAMADDA can use pdfbox to provide a number of services for PDF files - extract images, split into separate files, encrypt, etc. To install download the pdfbox.sh from https://github.com/geodesystems/ramadda/blob/master/bin/pdfbox.sh. You will also need to download pdfbox-app-3.0.4.jar from https://pdfbox.apache.org/download.html and copy it to the same dir as the script. Once installed set the following property
service.pdfbox=<path>/pdfbox.sh
Zoomable Images
The Zoomable Image entry type uses an external script, magick-slicer.sh, that is available on Github. This script requires ImageMagic to be installed. Once installed add the below property to your repository.properties file:
ramadda.image.slicer=/path/to/magick-slicer.sh
If running on Amazon AWS you can install ImageMagick with:
sudo yum install -y ImageMagick ImageMagick-devel
Tesseract OCR
When ingesting images RAMADDA can extract text from the image using the Tesserarct OCR package. This text can then be used for searching. To configure this first install https://github.com/tesseract-ocr/tesseract. Once installed add the below property to your repository.properties file:
ramadda.tesseract=/path/to/tesseract
Some systems have Tesseract available via package manager. Unfortunately Amazon Linux is not one of those. Here are the instructions on how to build Tessearct.

Build leptonica
wget https://github.com/DanBloomberg/leptonica/archive/refs/tags/1.83.1.tar.gz
tar -xvzf 1.83.1.tar.gz
cd leptonica-1.83.1
./autobuild
./configure
make
sudo make install
Then call:
export PKG_CONFIG_PATH='/usr/local/lib/pkgconfig'
Download tesseract and build Tesseract
wget https://github.com/tesseract-ocr/tesseract/archive/refs/tags/5.3.1.tar.gz
tar -xvzf 5.3.1.tar.gz
cd tesseract-5.3.1
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
Download the Tesseract training data
# Navigate to the tessdata directory
sudo mkdir -p /usr/local/share/tessdata
cd /usr/local/share/tessdata

# Download the English language training data, for example
sudo wget https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata
You can override where Tika looks for Tesseract by copying the extra tika.xml file onto your server. Consult the file for what needs to be set.
Jupyter Notebooks
RAMADDA supports a Jupyter Notebook entry type. It will do its own custom rendering of the notebook. You can also configure RAMADDA to use jupyter to do the rendering by setting the following property value:
ramadda.jupyter.path=/path/to/anaconda/bin/jupyter
GDAL
RAMADDA integrates a number of GDAL based geospatial and raster services. To enable this install GDAL and set the following properties:
service.gdal=/usr/local/bin
service.gdal.gdal_translate=/usr/local/bin/gdal_translate
service.gdal.gdalinfo=/usr/local/bin/gdalinfo
service.gdal.ogrinfo=/usr/local/bin/ogrinfo
service.gdal.gdalwarp=/usr/local/bin/gdalwarp
service.gdal.gdaldem=/usr/local/bin/gdaldem
service.gdal.ogr2ogr=/usr/local/bin/ogr2ogr
To install gdal it might be available on your system's package manager (e.g, yum, brew). Alternatively, you can use pixi to easily install gdal. See https://www.youtube.com/watch?v=2GNmhmoIiJs

Install pixi:
curl -fsSL https://pixi.sh/install.sh | bash
Make a geo dir and init pixi:
mkdir geo
cd geo
pixi init
Add gdal:
pixi add gdal
pixi will install gdal into:
/home/ec2-user/geo/.pixi/envs/default/bin
You can add it to your PATH in the .bashrc
set PATH="$PATH:/home/ec2-user/geo/.pixi/envs/default/bin"
Then add the properties to repository.properties
service.gdal=/home/ec2-user/geo/.pixi/envs/default/bin
service.gdal.gdal_translate=/home/ec2-user/geo/.pixi/envs/default/bin/gdal_translate
service.gdal.gdalinfo=/home/ec2-user/geo/.pixi/envs/default/bin/gdalinfo
service.gdal.gdalwarp=/home/ec2-user/geo/.pixi/envs/default/bin/gdalwarp
service.gdal.gdaldem=/home/ec2-user/geo/.pixi/envs/default/bin/gdaldem
service.gdal.ogr2ogr=/home/ec2-user/geo/.pixi/envs/default/bin/ogr2ogr
Quicktime
Install Quicktime tools and specify the location of the install - where qt_info, qt_export, etc. - with:
service.qttools=/usr/local/bin
Geo data
NetCDF Operators - NCO
service.nco.ncwa=/opt/local/bin/ncwa
Climate data operators - CDO
service.cdo=/opt/local/bin/cdo
HDF5 tools
service.hdf5.h5ls=/opt/local/bin/h5ls
MB System Bathymetry data
service.mb.mbinfo=/usr/local/bin/mbinfo
service.mb.mblist=/usr/local/bin/mblist
Bioinformatics
Dicom image tools dcm4che
service.dicom.dcm4che=<path>/dcm4che-2.0.28/bin
OME Bio-Formats
service.bfconvert = <path>/bftools/bfconvert
SRATools -
service.sratools=<path>/sratoolkit.2.3.5-2/bin
HMMER Tools -
service.hmmertools=<path>/hmmer-3.1b1-macosx-intel/binaries
Picard -
service.picard=<path>/picard-tools-1.119/picard.sh
Service XML
A service is specified as either an outputhandler XML file or a services XML plugin. Below is an example of two output services, one defined inline and the other referencing a service defined in the below services.xml file. There are enabled by setting the properties in a .properties file:
service.test1=/path/to/program
service.test2=/path/to/program
Note: To install as a plugin remove the "_ex1" so you have an outputhandlers.xml plugin file.
<outputhandlers class="org.ramadda.repository.output.ServiceOutputHandler">
<!-- You can specify attributes that are inherited by all services, e.g., class="ServiceOutputHandler" 
This xml can either contain the service xml directly
or it can refer to a service that was defined in a separate services.xml file -->

  <outputhandler  category="Test Output">
<!-- Set a property service.test1=/path/to/executable.sh in a .properties file in your RAMADDA home dir -->
    <service id="test_service1"  command="${service.test1}" label="Run example service 1" icon="/icons/pdf.png" >

<!-- Specify an entry of a particular type (type_document_pdf) -->
       <arg value="${entry.file}" type="entry" entryType="type_document_pdf" primary="true" label="Input PDF File" ></arg>

<!-- ... There would be other service attributes here. See services.xml ... -->

    </service>
  </outputhandler>

<!-- Or you can have the output handler reference the service id from a services.xml file -->
  <outputhandler  category="Test Output" serviceId="test_service2"/>


</outputhandlers>
examples/outputhandlers_ex1.xml
Services can be defined in a separate services.xml file.
<services>
<!-- Set a property service.test2=/path/to/executable.sh in a .properties file in your RAMADDA home dir -->
    <service 
       id="test_service1"  
       command="${service.test2}" 
       label="Run example service 1" 
       icon="/icons/pdf.png" >
    <description><!  class="wiki-link-external"  href="CDATA[Runs"  > an example service></description>
<!-- Define the command line arguments -->

<!--
Each arg tag has the following attributes:
type (string, flag, enumeration, value,int, entry, etc)
name - the url argument id 
value - a value to use - may contain ${...} macros
label
help - shown in the form
values - list of comma separated enum values
prefix - added to the arg list if the value is defined
-->


<!-- Always have 'any value' as an arg -->
       <arg value="any value"/>

<!-- specify type='enumeration' for a pull down list. Add the "none" item -->
       <arg name="fruit1" type="enumeration" values="apple,banana,orange" addNone="true"/>

<!-- specify value:label pairs -->
       <arg name="fruit2" type="enumeration" values="apple:Apple label,banana:Banana label,orange:Orange label"/>

<!-- Specify a value attribute where the macro '${value}' is replaced with the selected value -->
       <arg name="fruit3" type="enumeration" values="apple,banana,orange" value="fruit=${value}"/>

<!-- Input field -->
       <arg name="string1" type="string" size="50"  label="Some string" help="Help text goes after the field"/>

<!-- If the string is defined then also add the prefix as an argument -->
       <arg name="string2" type="string" size="50"  label="Some string" prefix="-string"/>

<!-- use an int type-->
       <arg name="length" type="int" default="5"  label="Length"/>


<!-- If checkbox is selected then add the value as an arg-->
       <arg name="flag1" type="flag"   label="Some flag" value="flag1 selected"/>

<!-- If checkbox is selected then add the "-someflag" "flag1" -->
       <arg name="flag2" type="flag"   label="Some flag" prefix="-someflag" value="flag1"/>

<!-- Args of type entry match up with specific entry types in ramadda -->
       <arg value="${entry.file}" type="entry" entryType="type_document_pdf" primary="true" label="Input PDF File" ></arg>

<!-- This uses the macro ${entry.file.base} to get the base name (minus the suffix) of the selected entry's file
So, if we having incoming.pdf the output file is incoming.txt -->
       <arg value="${file}" file="${entry.file.base}.txt"></arg>

<!--
Now define the outputs. Each output has a regexp pattern that matches on any generated file
You can specify an entry type for the entries that get created for each file
-->
       <output type="file" pattern=".*\.txt"/>
       <output type="type_image" pattern=".*\.png"/>

<!-- If the service produces text to the stdout then this specifies to write to a file -->
      <output showResults="true" stdout="true" filename="test.txt"/>
   
 </service>
</services>
examples/services_ex1.xml

One command line argument made up of multiple user choices.

Use the include attribute to provide a user interface element (e.g., date select) but not directly add the value to the command line arguments. Rather you can embed the value in a later argument with the "${name}" macro syntax. e.g. org/ramadda/geodata/cdmdata/resources/cdoservices.xml
//specify 2 date arguments
   <arg type="date" name="cdo.fromdate" label="Start Date" include="false" valuesProperty="dateList"/>
   <arg type="date" name="cdo.todate" label="End Date" include="false" valuesProperty="dateList"/>
//specify a simple value argument that includes the values of the two date args
   <arg value="-seldate,${cdo.fromdate},${cdo.todate}"/>
Here we have an image format enumeration value with include=false. It is used From org/ramadda/bio/image/services.xml
<arg type="enumeration" name="imageformat" label="Image type" values="png,gif,jpg,tiff" include="false" default="png"/>

//Specify an entry
<arg value="${entry.file}" type="entry"  label="Input image file" primary="true" entryType="bio_dicom,bio_ome_tiff"></arg>

//Provide the output image
<arg value="${file}" file="${entry.file.base}${suffix}.${imageformat}"/>