Re: GS image generation fails

From Stefan Boddie
DateThu, 12 Dec 2002 09:54:17 +1300
Subject Re: GS image generation fails
In-Reply-To (20021208193243C-tao-lib-uchicago-edu)
Hi Tod,

The first thing I'd suggest is that you get an up-to-date copy of Greenstone
using CVS (details at
Unfortunately the gimp-perl scripts in gsdl-2.38 are a little out of date.

Once you've done that you should be able to create new greenstone interface
images either manually using the,,
etc. scripts or automatically using the script.

Either way, it's probably a good idea to take a look at This
script parses a Greenstone macro file and processes any images specified in
it (most of the english language images are specified in the
macro file and generated using Images are specified with
comments as follows:

## "titles a-z" ## nav_bar_button ## ttitl ##

When processes the above it'll create "nav_bar_button" type
images with the text "titles a-z" on them. If you search in for
"nav_bar_button" you'll see it creates the images by executing the following
two commands (the first creates the yellow "titles a-z" button and it's
rollover image and the second creates the green "disabled" version of the
button). -text "titles a-z" -filenamestem ttitl -fontsize
17 -height 17 -fixed_width -width 87 -text "titles a-z" -filename ttitlgr.gif

Once you get all this working the easiest way to create new images is
probably to create a dummy macro file that contains just the ## ... ## ...
## ... ## comments specifying the new images. You can then process them all
at once with Changing the colours, fonts, etc can be done with
simple changes to

I hope some of this helps.


----- Original Message -----
From: "Tod Olson" <>
To: <>
Sent: Monday, December 09, 2002 2:32 PM
Subject: GS image generation fails

> I'm running Greenstone 2.38 on a RedHat Linux 7.2 box, gimp-1.2.1-7 and
> gimp-perl-1.2.1-7 rpms are installed.
> First attemp to generate images resulted in:
> required callback 'net' not found (ERROR)
> required callback 'net' not found (ERROR)
> I noticed the, etc. scripts and copied them into place.
Now I get:
> /^HASH(0x82219ac/: unmatched () in regexp at
/usr/local/gsdl/bin/script/gimp/ line 385. (DIE)
> /^HASH(0x82219ac/: unmatched () in regexp at
/usr/local/gsdl/bin/script/gimp/ line 385. (DIE)
> This is in the wrap_text subroutine:
> sub wrap_text {
> # don't wrap text if it already contains carriage returns
> return if $text =~ / /;
> # the following assumes that all words are less than $wrap_length long
> my $wrap_length = 14;
> my $new_text = "";
> while (length ($text) >= $wrap_length) {
> my $line = substr ($text, 0, $wrap_length);
> $text =~ s/^$line//; # <--- line 385
> $line =~ s/s([^s]*)$/ /;
> $text = $1 . $text;
> $new_text .= $line;
> }
> $new_text .= $text;
> $text = $new_text;
> }
> Perl's not my gig, but it looks like $line comes from a config file
> somewhere.
> Anyone have a clue?
> The follow question will be: once these scripts are working, I will
> want to customize the images somewhat. For example, I have browseable
> MusicGenre metadata, but I want the nav bar button to say "genre."
> Might also want to change the default color scheme and such. I know
> these images live in $GSDLHOME/images, but I don't know the naming
> conventions, and I don't know whether some of the defaults live in a
> file somewhere. Any light shed would be appreciated.
> Tod A. Olson <> "How do you know I'm mad?" said Alice.
> Programmer / Analyst "If you weren't mad, you wouldn't have
> The University of Chicago Library come here," said the Cat.