Opened 16 years ago
Last modified 15 years ago
#363 new enhancement
automatic metadata extaction from filenames
Reported by: | kjdon | Owned by: | nobody |
---|---|---|---|
Priority: | moderate | Milestone: | Collection building wishlist |
Component: | Collection Building | Severity: | enhancement |
Keywords: | Cc: |
Description
From an email 28/03/08 from Pablo San Juan
I need your help. I´m testing Greenstone 2.80 release and I´m trying to use MetadataXMLPlug plugin in order to include automatic metadata to my collection files.
Here is an extract from metadata.xml file:
<FileName>\w{3}d\{8}\.pdf</FileName> <Description>
<Metadata mode="override" name="pren.Fecha">$1</Metadata>
</Description>
</FileSet>
It´s a newspaper´s collection. The filenames of my collection are like "ABC20080327.PDF"; the three first characters indicates newspaper abreviature, and next 8 characters indicate new date(year,month and day). In <Filename> tag I´m using a perl expression and I want to use its match to insert this value as new metadata value in metadata tag. How can I use $1 variable (the match result in perl expression) in Metadata tag?