mhonarc-users

The whole month split issue...

1998-08-20 14:34:19

Hiya...

        After getting the rsponses to the effect that it isn't currently
possible to do it, I started playing around with at least a partial
solution, using MHonarc, archive2.pl and htdig.  It works, and does most
of what I want, and is simple...

#!/bin/sh
HTDIG_DIR=/home/projects/pgsql/ftp/www/htdig
cd /home/projects/pgsql/ftp/www/html/mhonarc
for j in `cat .lists`
do
  cd $j
  for i in `ls archive`
  do
    datestr=`echo $i | awk -F. '{print $2}'`
    yearstr=`echo $datestr | cut -c1-4`
    monthstr=`echo $datestr | cut -c5-6`
    directory=`echo ${yearstr}-${monthstr}`
    if [ ! -d $directory ]
    then
      mkdir $directory
    fi
    /usr/local/bin/mhonarc \
      -add -rcfile ../.resource \
      -outdir $directory archive/${i}
    echo "<blockquote>" > middle
    echo "<center><h1>archives</h1></center>" >> middle
  done
  echo "" >> middle
  echo "<center>" >> middle
  echo "<form method=post action=/cgi/htsearch>" >> middle
  echo " <font size=-1>" >> middle
  echo "  Match: <select name=method>" >> middle
  echo "          <option value=and>All" >> middle
  echo "          <option value=or>Any" >> middle
  echo "         </select>" >> middle
  echo "  Format: <select name=format>" >> middle
  echo "           <option value=builtin-long>Long" >> middle
  echo "           <option value=builtin-short>Short" >> middle
  echo "          </select>" >> middle
  echo " </font>" >> middle
  echo " <input type=hidden name=config value=${j}>" >> middle
  echo ' <input type=hidden name=restrict value="">' >> middle
  echo ' <input type=hidden name=exclude value="">' >> middle
  echo " Search:" >> middle
  echo ' <input type="text" size="30" name="words" value="">' >> middle
  echo " <input type="submit" value="Search">" >> middle
  echo "</form>" >> middle
  echo "</center>" >> middle
  echo "" >> middle
  echo "<p><center>" >> middle
  for i in `ls -d 19*`
  do
    echo -n "<b>${i}:</b> ["
    echo -n "<A HREF="${i}/index.html">index</A>] "
    echo "[<A HREF="${i}/threads.html">threads</A>]</br> "
  done >> middle
  echo "</center>" >> middle
  cat top middle bottom > index.html
  ( ${HTDIG_DIR}/bin/htdig -c ${HTDIG_DIR}/conf/${j}.conf -s; \
    ${HTDIG_DIR}/bin/htmerge -c ${HTDIG_DIR}/conf/${j}.conf -s; \
    ${HTDIG_DIR}/bin/htnotify -c ${HTDIG_DIR}/conf/${j}.conf ) | \
        mail -s "HT/dig: ${j}" scrappy &
  cd ..
done

<Prev in Thread] Current Thread [Next in Thread>
  • The whole month split issue..., The Hermit Hacker <=