[Koha-patches] [PATCH] A script generating keyword clouds from Zebra Indexes

Frederic Demians frederic at tamil.fr
Tue Dec 23 08:53:00 CET 2008


> I've pushed this, but there are a number of bugs, including one 
> blocker, that I would appreciate it if you sent patches for:

Thanks Galen for testing.

> [1] bug 2875: cloud-kw.pl Withcss option ignored
> [2] bug 2876 (blocker): cloud-kw.pl: enters infinite loop if index
> does not exist
> [3] bug 2877: cloud-kw.pl: does not use KOHA_CONF
> [4] bug 2878 (enh): cloud-kw.pl: should use HTML template
> [5] bug 2879: cloud-kw.pl: can crash with divide by zero error

I'm about to send a patch to fix those errors.

For (3), I keep a parameter to select Koha config file. It's useful on 
server with multiple Koha installations. But now the script will use 
KOHA_CONF by default.

For (4), you're correct. It would allow to do a lot of fancy things, 
like linking to Koha searches with absolute URL rather than just 
relatives, adding JavaScript to animate the cloud, etc. Stimulated by 
your demand, I've added an Improvement section in the documentation: 
take a look or complete.

For the time being, the idea is that a cloud is generated with CSS the 
first time in order to give an example on how the cloud can be styled. 
And then you should generate cloud without CSS and put directly CSS 
directives in the target environment where the cloud is to be used: a 
Koha page, a CMS, a blog, etc.

When Zebra will allow to scan on a resultset, I would be nice also to 
generate clouds, for example, for Subject in the last acquisition set, 
or for Authors on a specific subjects, etc.

>> + my $log_min = log( $min );
>> + my $max = $terms[$#terms-1][1];
> I'm not sure about this - $terms[$#terms-1] refers to the
> second-to-last element of the array, not the last one. Did you mean
> $terms[-1][1], perhaps?

No, this was supposed to access the last element of the array. So it was 
a HUGE bug. Thanks for pointing it out. A mix of Perl and something else.

Leaving this morning for few days, I will catch your feedback next week 
if necessary.

Regards,
-- 
Frédéric DEMIANS
http://www.tamil.fr/u/fdemians.html



More information about the Koha-patches mailing list