[Gnucash-changes] r13438 - mail-search/nmz - Script to build the Namazu indices

Derek Atkins warlord at cvs.gnucash.org
Thu Mar 2 16:14:08 EST 2006


Author: warlord
Date: 2006-03-02 16:14:07 -0500 (Thu, 02 Mar 2006)
New Revision: 13438
Trac: http://svn.gnucash.org/trac/changeset/13438

Added:
   mail-search/nmz/build-indices.sh
Log:
Script to build the Namazu indices


Added: mail-search/nmz/build-indices.sh
===================================================================
--- mail-search/nmz/build-indices.sh	2006-03-02 20:55:02 UTC (rev 13437)
+++ mail-search/nmz/build-indices.sh	2006-03-02 21:14:07 UTC (rev 13438)
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# Build the Namazu search indices
+#
+# Written by:  Derek Atkins <derek at ihtfp.com>
+#
+# $Id$
+
+######
+# Potential things you might want/need to change
+
+# This is the top of the namazu tree
+topdir=/home/nmz
+
+# This is the top of the namazu indices; the individual
+# indexes live below here.  This is relative to $topdir
+indexdir=index
+
+# This is the top of the namazu templates.  Right now
+# this is the only template directory available, but
+# in the future we could turn this into the top-level
+# of the per-list template.  This is also relative to
+# $topdir
+templatedir=nmz/templates
+
+# This is the top of the mailman archives.
+mailmandir=/home/mailman/archives/public
+
+# This is the list of mailman lists to index
+lists="gnucash-user gnucash-devel"
+
+# Nothing to see/change below this line
+###########################################################################
+#
+
+mydie()
+{
+    echo "$1"
+    exit 1
+}
+
+cd $topdir || mydie "Cannot cd to $topdir"
+
+for list in $lists ; do
+
+  # Make sure the template directory exists
+  [ -d $templatedir ] || mydie "Cannot find template directory: $templatedir"
+
+  # Make sure the archive exists
+  [ -d $mailmandir/$list ] || mydie "Cannot find the $list mailman archive"
+
+  # Make sure the index directory exists
+  if [ ! -d $indexdir/$list ] ; then
+    mkdir -p $indexdir/$list || mydie "Cannot mkdir $indexdir/$list"
+  fi
+
+  # Build the namazu index for this list
+  mknmz -s -Z -q -e -O $indexdir/$list \
+    --media-type='text/html; x-type=pipermail' \
+    --template-dir=$templatedir $mailmandir/$list 2>/dev/null
+
+done


Property changes on: mail-search/nmz/build-indices.sh
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:eol-style
   + native



More information about the gnucash-changes mailing list