From: Tiago Saboga <tiagosaboga@gmail.com>
Date: Fri, 30 Mar 2018 17:25:48 +0200
Subject: No description.

---
 bin/beanybaby       | 35 +++--------------------------------
 bin/filterbuilder   | 34 +++-------------------------------
 bin/lexer           | 35 +++--------------------------------
 bin/linkextractor   | 35 +++--------------------------------
 bin/parser          | 35 +++--------------------------------
 bin/sitecapturer    | 35 +++--------------------------------
 bin/stringextractor | 35 +++--------------------------------
 bin/thumbelina      | 34 +++-------------------------------
 bin/translate       | 35 +++--------------------------------
 9 files changed, 27 insertions(+), 286 deletions(-)

diff --git a/bin/beanybaby b/bin/beanybaby
index be0530f..e70c90b 100755
--- a/bin/beanybaby
+++ b/bin/beanybaby
@@ -1,34 +1,5 @@
 #! /bin/sh
 
-if [ -z "$HTMLPARSER_HOME" ] ; then
-
-  ## resolve links - $0 may be a link to the home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-  
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-	PRG="$link"
-    else
-	PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-  
-  HTMLPARSER_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  HTMLPARSER_HOME=`cd "$HTMLPARSER_HOME" && pwd`
-fi
-
 if [ -z "$JAVACMD" ] ; then 
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
@@ -55,13 +26,13 @@ if [ -n "$CLASSPATH" ] ; then
   LOCALCLASSPATH="$CLASSPATH"
 fi
 
-HTMLPARSER_LIB="${HTMLPARSER_HOME}/lib"
+HTMLPARSER_LIB="/usr/share/java"
 
 # add in the parser .jar file
 if [ -z "$LOCALCLASSPATH" ] ; then
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar"
 else
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar":"$LOCALCLASSPATH"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar":"$LOCALCLASSPATH"
 fi
 
 # handle 1.1x JDKs
diff --git a/bin/filterbuilder b/bin/filterbuilder
index 5170536..0800033 100755
--- a/bin/filterbuilder
+++ b/bin/filterbuilder
@@ -1,34 +1,5 @@
 #! /bin/sh
 
-if [ -z "$HTMLPARSER_HOME" ] ; then
-
-  ## resolve links - $0 may be a link to the home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-  
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-	PRG="$link"
-    else
-	PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-  
-  HTMLPARSER_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  HTMLPARSER_HOME=`cd "$HTMLPARSER_HOME" && pwd`
-fi
-
 if [ -z "$JAVACMD" ] ; then 
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
@@ -51,7 +22,8 @@ if [ ! -x "$JAVACMD" ] ; then
   exit 1
 fi
 
-HTMLPARSER_LIB="${HTMLPARSER_HOME}/lib"
+HTMLPARSER_LIB="/usr/share/java"
+HTMLPARSER_EXLIB="/usr/share/doc/libhtmlparser-java/examples/lib"
 
-"$JAVACMD" -Xmx256M -classpath "${HTMLPARSER_LIB}/filterbuilder.jar:${HTMLPARSER_LIB}/htmlparser.jar" org.htmlparser.parserapplications.filterbuilder.FilterBuilder "$@"
+"$JAVACMD" -Xmx256M -classpath "${HTMLPARSER_EXLIB}/filterbuilder.jar:${HTMLPARSER_LIB}/libhtmlparser.jar" org.htmlparser.parserapplications.filterbuilder.FilterBuilder "$@"
 
diff --git a/bin/lexer b/bin/lexer
index 9378d68..3aca776 100755
--- a/bin/lexer
+++ b/bin/lexer
@@ -1,34 +1,5 @@
 #! /bin/sh
 
-if [ -z "$HTMLPARSER_HOME" ] ; then
-
-  ## resolve links - $0 may be a link to the home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-  
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-	PRG="$link"
-    else
-	PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-  
-  HTMLPARSER_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  HTMLPARSER_HOME=`cd "$HTMLPARSER_HOME" && pwd`
-fi
-
 if [ -z "$JAVACMD" ] ; then 
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
@@ -55,13 +26,13 @@ if [ -n "$CLASSPATH" ] ; then
   LOCALCLASSPATH="$CLASSPATH"
 fi
 
-HTMLPARSER_LIB="${HTMLPARSER_HOME}/lib"
+HTMLPARSER_LIB="/usr/share/java"
 
 # add in the lexer .jar file
 if [ -z "$LOCALCLASSPATH" ] ; then
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmllexer.jar"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar"
 else
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmllexer.jar":"$LOCALCLASSPATH"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar":"$LOCALCLASSPATH"
 fi
 
 # handle 1.1x JDKs
diff --git a/bin/linkextractor b/bin/linkextractor
index 82fe822..2c07138 100755
--- a/bin/linkextractor
+++ b/bin/linkextractor
@@ -1,34 +1,5 @@
 #! /bin/sh
 
-if [ -z "$HTMLPARSER_HOME" ] ; then
-
-  ## resolve links - $0 may be a link to the home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-  
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-	PRG="$link"
-    else
-	PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-  
-  HTMLPARSER_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  HTMLPARSER_HOME=`cd "$HTMLPARSER_HOME" && pwd`
-fi
-
 if [ -z "$JAVACMD" ] ; then 
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
@@ -55,13 +26,13 @@ if [ -n "$CLASSPATH" ] ; then
   LOCALCLASSPATH="$CLASSPATH"
 fi
 
-HTMLPARSER_LIB="${HTMLPARSER_HOME}/lib"
+HTMLPARSER_LIB="/usr/share/java"
 
 # add in the parser .jar file
 if [ -z "$LOCALCLASSPATH" ] ; then
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar"
 else
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar":"$LOCALCLASSPATH"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar":"$LOCALCLASSPATH"
 fi
 
 # handle 1.1x JDKs
diff --git a/bin/parser b/bin/parser
index 67ec15b..fa00098 100755
--- a/bin/parser
+++ b/bin/parser
@@ -1,34 +1,5 @@
 #! /bin/sh
 
-if [ -z "$HTMLPARSER_HOME" ] ; then
-
-  ## resolve links - $0 may be a link to the home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-  
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-	PRG="$link"
-    else
-	PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-  
-  HTMLPARSER_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  HTMLPARSER_HOME=`cd "$HTMLPARSER_HOME" && pwd`
-fi
-
 if [ -z "$JAVACMD" ] ; then 
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
@@ -55,13 +26,13 @@ if [ -n "$CLASSPATH" ] ; then
   LOCALCLASSPATH="$CLASSPATH"
 fi
 
-HTMLPARSER_LIB="${HTMLPARSER_HOME}/lib"
+HTMLPARSER_LIB="/usr/share/java"
 
 # add in the parser .jar file
 if [ -z "$LOCALCLASSPATH" ] ; then
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar"
 else
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar":"$LOCALCLASSPATH"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar":"$LOCALCLASSPATH"
 fi
 
 # handle 1.1x JDKs
diff --git a/bin/sitecapturer b/bin/sitecapturer
index 4910857..96b1ad6 100755
--- a/bin/sitecapturer
+++ b/bin/sitecapturer
@@ -1,34 +1,5 @@
 #! /bin/sh
 
-if [ -z "$HTMLPARSER_HOME" ] ; then
-
-  ## resolve links - $0 may be a link to the home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-  
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-	PRG="$link"
-    else
-	PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-  
-  HTMLPARSER_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  HTMLPARSER_HOME=`cd "$HTMLPARSER_HOME" && pwd`
-fi
-
 if [ -z "$JAVACMD" ] ; then 
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
@@ -55,13 +26,13 @@ if [ -n "$CLASSPATH" ] ; then
   LOCALCLASSPATH="$CLASSPATH"
 fi
 
-HTMLPARSER_LIB="${HTMLPARSER_HOME}/lib"
+HTMLPARSER_LIB="/usr/share/java"
 
 # add in the parser .jar file
 if [ -z "$LOCALCLASSPATH" ] ; then
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar"
 else
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar":"$LOCALCLASSPATH"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar":"$LOCALCLASSPATH"
 fi
 
 # handle 1.1x JDKs
diff --git a/bin/stringextractor b/bin/stringextractor
index 5b43a42..6b3541e 100755
--- a/bin/stringextractor
+++ b/bin/stringextractor
@@ -1,34 +1,5 @@
 #! /bin/sh
 
-if [ -z "$HTMLPARSER_HOME" ] ; then
-
-  ## resolve links - $0 may be a link to the home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-  
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-	PRG="$link"
-    else
-	PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-  
-  HTMLPARSER_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  HTMLPARSER_HOME=`cd "$HTMLPARSER_HOME" && pwd`
-fi
-
 if [ -z "$JAVACMD" ] ; then 
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
@@ -55,13 +26,13 @@ if [ -n "$CLASSPATH" ] ; then
   LOCALCLASSPATH="$CLASSPATH"
 fi
 
-HTMLPARSER_LIB="${HTMLPARSER_HOME}/lib"
+HTMLPARSER_LIB="/usr/share/java"
 
 # add in the parser .jar file
 if [ -z "$LOCALCLASSPATH" ] ; then
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar"
 else
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar":"$LOCALCLASSPATH"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar":"$LOCALCLASSPATH"
 fi
 
 # handle 1.1x JDKs
diff --git a/bin/thumbelina b/bin/thumbelina
index 664ae27..a86389f 100755
--- a/bin/thumbelina
+++ b/bin/thumbelina
@@ -1,34 +1,5 @@
 #! /bin/sh
 
-if [ -z "$HTMLPARSER_HOME" ] ; then
-
-  ## resolve links - $0 may be a link to the home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-  
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-	PRG="$link"
-    else
-	PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-  
-  HTMLPARSER_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  HTMLPARSER_HOME=`cd "$HTMLPARSER_HOME" && pwd`
-fi
-
 if [ -z "$JAVACMD" ] ; then 
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
@@ -51,7 +22,8 @@ if [ ! -x "$JAVACMD" ] ; then
   exit 1
 fi
 
-HTMLPARSER_LIB="${HTMLPARSER_HOME}/lib"
+HTMLPARSER_LIB="/usr/share/java"
+HTMLPARSER_EXLIB="/usr/share/doc/libhtmlparser-java/examples/lib"
 
-"$JAVACMD" -Xmx256M -classpath "${HTMLPARSER_LIB}/thumbelina.jar:${HTMLPARSER_LIB}/htmllexer.jar" org.htmlparser.lexerapplications.thumbelina.Thumbelina "$@"
+"$JAVACMD" -Xmx256M -classpath "${HTMLPARSER_EXLIB}/thumbelina.jar:${HTMLPARSER_LIB}/libhtmlparser.jar" org.htmlparser.lexerapplications.thumbelina.Thumbelina "$@"
 
diff --git a/bin/translate b/bin/translate
index 70dfaf6..031e7f5 100755
--- a/bin/translate
+++ b/bin/translate
@@ -1,34 +1,5 @@
 #! /bin/sh
 
-if [ -z "$HTMLPARSER_HOME" ] ; then
-
-  ## resolve links - $0 may be a link to the home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-  
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-	PRG="$link"
-    else
-	PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-  
-  HTMLPARSER_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  HTMLPARSER_HOME=`cd "$HTMLPARSER_HOME" && pwd`
-fi
-
 if [ -z "$JAVACMD" ] ; then 
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
@@ -55,13 +26,13 @@ if [ -n "$CLASSPATH" ] ; then
   LOCALCLASSPATH="$CLASSPATH"
 fi
 
-HTMLPARSER_LIB="${HTMLPARSER_HOME}/lib"
+HTMLPARSER_LIB="/usr/share/java"
 
 # add in the parser .jar file
 if [ -z "$LOCALCLASSPATH" ] ; then
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar"
 else
-  LOCALCLASSPATH="${HTMLPARSER_LIB}/htmlparser.jar":"$LOCALCLASSPATH"
+  LOCALCLASSPATH="${HTMLPARSER_LIB}/libhtmlparser.jar":"$LOCALCLASSPATH"
 fi
 
 # handle 1.1x JDKs
