[greenstone-users] RE: Create a new plugin

From Gordon Paynter
DateTue, 29 Apr 2003 12:56:12 -0700 (PDT)
Subject [greenstone-users] RE: Create a new plugin
Hi Duncan, sorry for the late reply.

> I'm trying to get audio files in to my collection, using the
> unknownplug, however the build process still fails to find any data
> (currently the audio files are .wma). I've used the line below, but I
> don't understand the -process_exp line. I have changed this to
> -process_exp '.wma', but with the same result.

Are you sure the collection is failing to discover the files? It may be
that the files are being imported, but not displayed. (To find out, check
the import log, or look in the archives dir for the files.)

Once imported, you'll need to update the DocumentText macro to make sure
that the audio files are displayed in the correct way.

> Here's an example from a collect.cfg file:
> plugin UnknownPlug -process_exp '.MOV' -assoc_field 'movie'

This means that unknownPlug will lokk for files that match the regular
experssion ".MOV" (note: a perl regexp., bot a filesystem regexp), add the
file as an associated file, then store the filename of this assocuiated
file in the metadata field called "movie".

This means you can display the filename ina format string with the
expression [movie]. The URL of the file will be gvenerated from something
like this:


You should be able to set things up so that a URL generated from code like
this one above is used to play your movie/sound.