source: gs2-extensions/gstika/trunk/java/makeGSTikaCLI.sh@ 34174

Last change on this file since 34174 was 34174, checked in by ak19, 4 years ago
  1. Created GSTikaCLI.java based off TikaCLI.java of the apache tika-app jar, but with modifications to convert a doc to html and extract images in one step and correct the image file names so they match what the html refers to and correct the html img src attributes to not have an embedded: prefix that breaks the image linking. 2. Attempting to add this as a proper GS2 extension. It worked in the gs2build/ext folder (though some paths have now changed to reflect the gs2-extensions folder structur for an ext). I've not tested whether this works properly as an ext. Hope it will all still work once I make a tarball and zip out of this.
  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2
3
4##################################################################################
5# BEWARE TO ECHO ALL MSGS IN THIS SCRIPT TO STDERR BY ADDING >&2 AT END OF ECHO #
6# ELSE IT WILL GO INTO THE OUTPUT DOC PRODUCED BY Tika!!! #
7##################################################################################
8
9# To compile GSTikaClient.java against tika-app-*.jar:
10#GS3/gs2build/ext/tika>javac -cp "`pwd`/tika-app-1.24.1.jar" -d `pwd`/build src/org/greenstone/tika/GSTikaCLI.java
11
12#javac -cp lib/tika-app-1.24.1.jar -d build src/org/greenstone/tika/GSTikaCLI.java
13
14if [ "x$GEXT_GSTIKA" = "x" ]; then
15 echo "@@@ Source the Greenstone environment setup script first" >&2
16 exit -1
17fi
18
19tika_app_jar=$GEXT_GSTIKA/lib/tika-app-1.24.1.jar
20builddir="$GEXT_GSTIKA/build"
21
22if [ ! -f "$builddir/org/greenstone/tika/GSTikaClient.class" ]; then
23 if [ ! -d "$builddir" ]; then
24 echo "@@@@ Creating dir $builddir" >&2
25 mkdir "$builddir"
26 fi
27 echo "@@@@ Compiling up org.greenstone.tika.GSTikaClient" >&2
28 #javac -cp "tika-app-1.24.1.jar" -d build src/org/greenstone/tika/GSTikaCLI.java > /dev/null
29 javac -cp "$tika_app_jar" -d "$builddir" "$GEXT_GSTIKA/src/org/greenstone/tika/GSTikaCLI.java" > /dev/null
30fi
31
32echo "@@@@ Done."
33
Note: See TracBrowser for help on using the repository browser.