Re: [greenstone-devel] telling a plugin not to process a specific file

From richard
DateWed, 14 Feb 2007 08:56:32 +1300
Subject Re: [greenstone-devel] telling a plugin not to process a specific file
In-Reply-To (595b9ab20702112352w1e6db03ag972a846d047a5b03-mail-gmail-com)
Hi Stephen,

I would start by looking at ImagePlug's read function.
The $metadata argument passes in metadata from previous plugins.

So at the top of the read function you could do something like:

if ($metadata->{"Access"} ne "yes"){
  return 0; # because in this case the read function has processed 0 files.
}

I'm not sure if that is exactly what you are looking for, but I hope it helps,


Richard
--
DL Consulting
Greenstone Digital Library and Digitisation Specialists
contact@dlconsulting.com
www.dlconsulting.com


Stephen De Gabrielle wrote:
Hi,

I have a modified version of  MetadataCSVPlug that processes a specific metadata format and passes the metadata on for ImagePlug to attach to an image.

I need to exclude files that fail to match a specific metadata value (Access="yes") so I can split the one collection into two for the purpose of requiring a login for access to the 'Access="no"' subset.

I'm guessing I can modify ImagePlug to do this, but I'm not sure where to start.

Any hints appreciated...thanks

s.

--
Stephen De Gabrielle

_______________________________________________ greenstone-devel mailing list greenstone-devel@list.scms.waikato.ac.nz https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-devel