I did some modification of GnuCash website.

Geert Janssens janssens-geert at telenet.be
Tue May 18 06:21:19 EDT 2010


On Monday 17 May 2010, Tao Wang wrote:
> On Tue, May 18, 2010 at 1:37 AM, Geert Janssens
> 
> <janssens-geert at telenet.be> wrote:
> > On Sunday 16 May 2010, Tao Wang wrote:
> >> Hi, Geert
> >>
> >> I think I fixed the problem for namazu search engine, but I don't have
> >> the same environment as lists.gnucash.org, so could you help me to
> >> check whether it works?
> >>
> >> I did following changes:
> >>
> >> 1) Modified 'search/namazu-cgi.sh'. It first check QUERY_STRING for
> >> 'lang', if cannot find it, then check HTTP_COOKIE for 'lang_cookie'.
> >> If found the lang info, then set it to cookie.
> >> 2) Add 'search/search.phtml' to do the samething of 'namazu-cgi.sh'.
> >> If 'namazu-cgi.sh' is not working, you can check this php version.
> >> 3) Fix a bug in 'lang.phtml', which caused a warning in apache error.log
> >> 4) Fix a bug in 'Makefile', remove the output of '$text_dir = "."; ?>' .
> >
> > Tao,
> >
> > Derek has installed your version of namazu-cgi.sh, but it doesn't fix the
> > problem. I haven't tried the php variant yet. I'll see if we can set that
> > up tomorrow.
> >
> > Geert
> 
> If it doesn't work, could put some debug outputs to find out why? I
> think LANG is set correctly. However, I don't have the environment to
> test. Could you give me some instructions of how 'lists.gnucash.org'
> setup? And how mailman, namazu installed? so that I can build a same
> site on my ubuntu to have a try. Thanks.
> 
I don't know all the details of the installation. But here's what I know:
* The mailman and namazu services are run on a server managed by Derek.
* Namazu stores its indexes in /home/nmz/index (see 
http://pastebin.com/sS8mFYLz)
* /home/nmz/nmz is a checkout of htdocs.
* namazu is configured to use /home/nmz/nmz/search/templates as templates 
directory (see http://pastebin.com/BWPBHCvr)
* Note that this directory contains a lot of generated templates. These are 
generated by invoking "make nmz" in /home/nmz/nmz. This happens automatically 
with each commit to the htdocs svn repository.
* I have also attached /etc/namazu/namazurc. In it you can see where namazu 
looks for its templates and indexes and where the list archives are stored on 
the server (see the "Replace" rules).
* For the apache webserver configuration for namazu, look here: 
http://pastebin.com/vJvmdMtH
* Note that namazu-cgi.sh is located in /var/www/cgi-bin/namazu-cgi.sh. If any 
changes are made to this file, Derek has to copy it into place manually.
* If you need more information, you should ask Derek. The best place is on irc 
(http://wiki.gnucash.org/wiki/IRC). His nick is warlord. You may have to 
convince him though that your solution is better than what we have already.

Geert
-------------- next part --------------
# This is a Namazu configuration file for namazu or namazu.cgi.
#
#  Originally, this file is named 'namazurc-sample'.  so you should
#  copy this to 'namazurc' to make the file effective.
#  see 'doc/ja/manual.html#namazurc' or 'doc/en/manual.html#namazurc'.
#  
#  Each item is must be separated by one or more SPACE or TAB characters. 
#  You can use a double-quoted string for represanting a string which 
#  contains SPACE or TAB characters like "foo bar baz".


##
## Index: Specify the default directory.
## 
#Index         /usr/local/var/namazu/index
Index	/home/nmz/index


##
## Template: Set the template directory containing
## NMZ.{head,foot,body,tips,result} files.
##
#Template      /usr/local/var/namazu/index
Template	/home/nmz/nmz/search/templates


##
## Replace: Replace TARGET with REPLACEMENT in URIs in search
## results.  
##
## TARGET is specified by Ruby's perl-like regular expressions.  
## You can caputure sub-strings in TARGET by surrounding them 
## with `(' and `)'and use them later as backreferences by
## \1, \2, \3,... \9.
##  
## To use meta characters literally such as `*', `+', `?', `|', 
## `[', `]', `{', `}', `(', `)', escape them with `\'.
##  
## e.g.,
##  
##    Replace  /home/foo/public_html/   http://www.example.jp/~foo/
##    Replace  /home/(.*)/public_html/  http://www.example.jp/\1/
##    Replace  /[Cc]\|/foo/             http://www.example.jp/
##  
## If you do not want to do the processing on command line use, 
## run namazu with -U option.
##
## You can specify more than one Replace rules but the only 
## first-matched rule are applied. 
##
#Replace       /home/foo/public_html/  http://www.example.jp/~foo/
Replace /home/mailman/archives/public/ https://lists.gnucash.org/pipermail/
Replace /u1/mailman/archives/public/ https://lists.gnucash.org/pipermail/


##
## Logging: Set OFF to turn off keyword logging to NMZ.slog. 
## Default is ON.
##
#Logging       off


##
## Lang: Set the locale code such as `ja_JP.eucJP', `ja_JP.SJIS', 
## `de', etc.  This directive works only if the environment 
## variable LANG is not set because the directive is mainly 
## intended for CGI use.  On the shell, You can set 
## environemtnt variable LANG instead of using the directive.
## 
## If you set `de' to it, namazu.cgi use 
## NMZ.(head|foot|body|tips|results).de for displaying results 
## and use a proper message catalog for `de'.
##
#Lang          ja


##
## Scoring: Set the scoring method "tfidf" or "simple".
##
#Scoring       tfidf


##
## EmphasisTags: Set the pair of html elements which is used in
## keyword emphasizing for search results.
##
#EmphasisTags  "<strong class=\"keyword\">"   "</strong>"

##
## MaxHit: Set the maximum number of documents which can be
## handled in query operation.  If documents matching a
## query exceed the value, they will be ignored.
##
#MaxHit	10000

##
## MaxMatch: Set the maximum number of words which can be
## handled in regex/prefix/inside/suffix query. If documents
## matching a query exceed the value, they will be ignored.
##
#MaxMatch	1000

##
## ContentType: Set "Content-Type" header output. Specify "charset".
##
## When you specify English, French, German and Spanish charset
##
#ContentType	"text/html; charset=ISO-8859-1"
##
## When you specify Polish charset
##
#ContentType	"text/html; charset=ISO-8859-2"
##
## When you specify Japanese charset by UNIX
##
#ContentType	"text/html; charset=EUC-JP"
##
## When you specify Japanese charset by Windows
##
#ContentType	"text/html; charset=Shift_JIS"
##
## If you want to use non-HTML template files, set it suitably.
##
#ContentType	"text/x-hdml; charset=Shift_JIS"

##
## Charset: "charset" of each "Lang" is defined.
## When "charset" is not included in "ContentType", "charset" of default
## of each "Lang" is output.
## Please define it by "Charset" when you use the language of the
## unsupport. (It is necessary to prepare the template and the message
## catalog.)
##
#Charset "ja" "EUC-JP"
##
#Charset "ja_JP.SJIS" "Shift_JIS"
##
#Charset "ja_JP.ISO-2022-JP" "ISO-2022-JP"
##
#Charset "fr" "ISO-8859-1"
##
#Charset "de" "ISO-8859-1"
##
#Charset "es" "ISO-8859-1"
##
#Charset "pl" "ISO-8859-2"

##
## Suicide_Time: namazu.cgi stops the process in 60 seconds by 
## default.
## (Only UNIX)
##
#Suicide_Time	60

##
## Regex_Search: Set OFF to turn off regex_search.
## Default is ON.
##
#Regex_Search	off


More information about the gnucash-devel mailing list