namazu-users-en
[Top] [All Lists]

How do i write a filter

2000-11-28 02:25:20

Are there any plans for updating the english documentation. if so
I would like to know how to write a filter. I have a few plugins I want to
convert
which I wrote for my own simple text indexer. They have the form seen below.

# input: a filename
# output: undef on failure, otherwise a hash ref with the keys: title, desc,
text
sub textualize_mp3
{
    my $href = mp3_info($_[0]); 

    return undef unless (defined $href);

    my $temp = "$href->{title}\n$href->{artist}\n$href->{album}";
    return {
            title => $href->{artist}.' "'.$href->{title}.'" ',
            desc =>  $temp, # description
            text =>  "$temp\n$href->{year}\n$href->{comment} music mp3",
           };
}       

Vagn Johansen



<Prev in Thread] Current Thread [Next in Thread>