[greenstone-users] fiddling with macros (was: Queries on search features)

From jens wille
DateMon, 23 Jan 2006 11:55:07 +0100
Subject [greenstone-users] fiddling with macros (was: Queries on search features)
In-Reply-To (43D428F0-9090101-cs-waikato-ac-nz)
hi there!

Katherine Don [23.01.2006 01:53]:
> Macro files can be a bit tricky to work with, you often need to
> look through several macros, which call other macros etc before
> finding the one you need. But have a play with it and hopefully
> you can produce the search page that you want.
well, that's exactly what expand_macros.pl was intended for ;-)

for those who don't know about it: it's a little perl script that
reads all the macro files (*.dm) of your greenstone installation and
allows you to search for particular macro definitions and -
recursively - for macro definitions used within this definition ...
(up to a specified level) - and a few things more.

it's part of the greenstone distribution since v2.62 and also
available for download at [1] (@greenstone team: the current version
has been slightly modified as compared to the one in cvs).

[1] <http://blackwinter.de/tmp/expand_macros.pl.gz>

in case you download the current version: just gunzip, cp to
$GSDLHOME/bin/scripts, chmod a+x (if necessary) - that's it ;-)

type 'expand_macros.pl -h' to get an impression of its usage and
maybe even see the comments at the beginning of the source file.

(note that it's not explicitly designed to run on systems other than
a current linux - may work anyway; if not just drop me a line)

i'm not sure if this script might be of help to somebody - to me it
definitely is ;-)

cheers
jens