changeset 31:de63fae5f483

added document type (Book)
author casties
date Tue, 13 Jun 2006 17:04:27 +0200
parents 398ef4b8f072
children ae8b0506498a
files makemeta-vlp.pl
diffstat 1 files changed, 22 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/makemeta-vlp.pl	Mon Jun 12 19:01:39 2006 +0200
+++ b/makemeta-vlp.pl	Tue Jun 13 17:04:27 2006 +0200
@@ -10,7 +10,7 @@
 $|=1;
 
 # program version
-my $version = "0.2 (19.9.2005 ROC)";
+my $version = "0.2.1 (12.6.2006 ROC)";
 my $help = 
 "use: makemeta-vlp [options] file.xml
 options:
@@ -47,12 +47,25 @@
 	'NumberOfVolumes' => 'meta/bib/number-of-volumes',
 	'Pages' => 'meta/bib/number-of-pages'
     },
+    '(Book)' => {
+	'_name' => 'book',
+	'Author' => 'meta/bib/author',
+	'Title' => 'meta/bib/title',
+	'Year' => 'meta/bib/year',
+	'Place_Published' => 'meta/bib/city',
+	'Publisher' => 'meta/bib/publisher',
+	'Edition' => 'meta/bib/edition',
+	'Volume' => 'meta/bib/volume',
+	'NumberOfVolumes' => 'meta/bib/number-of-volumes',
+	'Pages' => 'meta/bib/number-of-pages',
+	'#Cover pages only, book sections have been extracted' => 'meta/bib/comment'
+    },
     'Book Section' => {
 	'_name' => 'inbook',
 	'Author' => 'meta/bib/author',
 	'Title' => 'meta/bib/title',
 	'Year' => 'meta/bib/year',
-	'Secondary_Title' => 'meta/bib/book-title',
+	'SecondaryTitle' => 'meta/bib/book-title',
 	'SecondaryAuthor' => 'meta/bib/editor',
 	'Volume' => 'meta/bib/volume',
 	'NumberOfVolumes' => 'meta/bib/number-of-volumes',
@@ -301,6 +314,13 @@
 		$cnt++;
 	    }
 	}
+	# append additional constant fields (beginning with #)
+	foreach my $k (keys %{$subtype_map{$type}}) {
+	    if ($k =~ /^\#(.*)/) {
+		my $val = $1;
+		create_text_path($subtype_map{$type}->{$k}, $val, $index_root, $namespace);
+	    }
+	}
     }
     return $cnt;
 }