Re: [greenstone-users] Modifying a plugin - or writing a new one

From Michael Dewsnip
DateMon, 22 Sep 2003 11:11:45 +1200
Subject Re: [greenstone-users] Modifying a plugin - or writing a new one
In-Reply-To (20030919161242-15833-qmail-web10307-mail-yahoo-com)

This sounds very much like the functionality of Greenstone's
"metadata.xml" files, unless I've misunderstood the question. I
mentioned these briefly in a previous e-mail, but I'll give some more
details now.

Metadata.xml files are a mechanism for manually assigning metadata to
files in a collection. They also allow you to assign the same metadata
to many files, using wildcards. To get an idea of what they look like,
and what they can do, have a look at the example metadata.xml file in
the "import" folder of the demo collection.

You can create a separate metadata.xml file for each file in your
collection, but you'll have to put them into their own directories. An
important point to remember is that for Greenstone to use metadata.xml
files, you must specify the "-use_metadata_files" option to RecPlug, in
your collect.cfg file.

I suggest you reformat your ".metadata" files into the metadata.xml
structure, and use Greenstone's built-in support for this, rather than
modifying the plugins.



I56 wrote:

> I'd like to create a new plug-in based on the PDF and
> PS plugins for my own personal use. I'll have a
> directory full of PDF and PS files. For each file I
> will also have a metadata file containing the XML
> metadata for Title, Subject, and FirstAuthor. So, for
> example, I might have a file named "cowie96.pdf" and
> have a metadata file named "cowie96.metadata" which
> contains the text:
> <Metadata name="Title">Information
> extraction</Metadata>
> <Metadata name="FirstAuthor">Cowie, Jim</Metadata>
> <Metadata name="Subject">1.3</Metadata>
> Question: How do I modify the plugins so that when I
> add files to my library, they also look for the
> corresponding "metadata" and add that information into
> the XML file used for indexing.
> Thanks,
> I56
> _______________________________________________
> greenstone-users mailing list