Various things..

Robert Ribnitz <[email protected]>
Newsgroups gmane.comp.web.htdig.devel
Message-ID <[email protected]>
Hello,

I have pslit the packages for debian, into a htdig (V. 3.1.6 - with a 
few patches), and a htdig3.2. At the moment, they do striclty conlfict 
with each other. This is because I don't want to rename all the scripts 
form thdig to htdig3.2 etc, which would complicate an upgrade.

I know that the htdig-project is perthaps short on manpower, but 
nevertheless I have a few observations:

- it is possible to run htdig -i, meaning that the update is full rather 
than incremental ('initial').
- if I use rundig -i, that option is passed to htdig (fine),  but also 
to htpurge and  htnotify  which error out, since they don't know any 
option -i

I have therefore adapted the 'rundig' script of htdig-3.1.6, and attach 
it here..

Please test..

Robert
rundig (text/plain, 2.2 KB)
#!/bin/sh

#
# rundig
#
# $Id: rundig,v 1.7.2.1 2001/06/07 19:33:56 grdetil Exp $
#
# This is a sample script to create a search database for ht://Dig.
#
# default DBDIR=@DATABASE_DIR@
DBDIR=`grep database_dir /etc/htdig/htdig.conf | awk '{ print $2 }'`
COMMONDIR=@COMMON_DIR@
BINDIR=@BIN_DIR@


# To help debug problems, try running rundig -vvv
# This will add lots of debugging output to all of the programs
stats= opts= alt= init=
while [ "$#" -gt 0 ]
do
case "$1" in
-a)  alt="$1" ;;
-s)  stats="$1" ;;
-i)  initial="$1" ;;
-c)  shift
conffile="$1"
opts="$opts -c $conffile"
;;
*)   opts="$opts $1" ;;     # e.g. -v
esac
shift

done

#
# Set the TMPDIR variable if you want htmerge to put files in a location
# other than the default.  This is important if you do not have enough
# disk space for the big sort that htmerge runs.  Also, be aware that
# on some systems, /tmp is a memory mapped filesystem that takes away
# from virtual memory.
#
TMPDIR=${TMPDIR:-$DBDIR}
export TMPDIR

$BINDIR/htdig $inital $opts $stats $alt
LC_COLLATE=C $BINDIR/htmerge $opts $stats $alt
case "$alt" in
-a)
  ( cd $DBDIR && test -f db.docdb.work &&
    for f in *.work
    do
        mv -f $f `basename $f .work`
    done ) ;;
esac
# If you're low on disk space and you don't mind completely reindexing
# every time you run this script, you can always
# rm $DBDIR/db.wordlist
# OR
# If you'd rather run update digs all the time with the minimal databases
# Keep only the following files (and don't call htdig with -i):
# db.docdb, db.docdb.work, db.docs.index, db.wordlist.work, db.words.db
$BINDIR/htnotify $opts
# If you want to use the soundex and (or) metaphone fuzzy matchings,
# Uncomment the following line
# $BINDIR/htfuzzy $opts soundex metaphone

#
# Create the endings and synonym databases if they don't exist
# or if they're older than the files they're generated from.
# These databases are semi-static, so even if pages change,
# these databases will not need to be rebuilt.
#
#if [ "`ls -t $COMMONDIR/english.0 $COMMONDIR/word2root.db 2>/dev/null | sed 1q`" = \
#	"$COMMONDIR/english.0" ]
#then
#    $BINDIR/htfuzzy $opts endings
#fi
#
#if [ "`ls -t $COMMONDIR/synonyms $COMMONDIR/synonyms.db 2>/dev/null | sed 1q`" = \
#	"$COMMONDIR/synonyms" ]
#then
#    $BINDIR/htfuzzy $opts synonyms
#fi
rundig.1 (text/plain, 1.1 KB)
.TH rundig 1 "23 April 1999"
.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
.\" other parms are allowed: see man(7), man(1)
.SH NAME
rundig \- sample script to create a search database for ht://Dig
.SH SYNOPSIS
.B rundig
.I "[options]"
.SH "DESCRIPTION"
.I rundig
is a sample script to create a search database for the ht://Dig
search engine.
.SH OPTIONS
.TP
.B \-v
Verbose mode. This increases the verbosity of the program.
.TP
.B \-a
Use alternate work files.
.B \-i
Do a full run of htdig, rather than incrementally updating only the changed documents
.TP
.TP
.B \-s
Print statistics about the dig after completion
.TP
.B \-c configfile
Use alternate config file.
.SH "SEE ALSO"
Please refer to the HTML pages (in the htdig-doc package)
.B /usr/share/doc/htdig-doc/html/index.html
and the manual pages
.I htdig(1)
,
.I htmerge(1)
,
.I htnotify(1)
,
.I htfuzzy(1)
for a detailed description of ht://Dig and its commands.
.SH AUTHOR
This manual page was written by Christian Schwarz, modified by 
Gergely Madarasz and Stijn de Bekker, based on the HTML documentation of
ht://Dig.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.