| 1 |
#! /usr/bin/perl -w |
| 2 |
|
| 3 |
# $Id: endnote-format,v 1.2 2007/02/16 01:16:48 mike Exp $ |
| 4 |
|
| 5 |
use strict; |
| 6 |
use warnings; |
| 7 |
use Getopt::Std; |
| 8 |
use Biblio::EndnoteStyle; |
| 9 |
|
| 10 |
my %opts; |
| 11 |
if (!getopts('d', \%opts) || @ARGV < 1 || @ARGV % 2 != 1) { |
| 12 |
print STDERR "Usage: $0 [options] 'template' key1 val1 [keyN valN] ... |
| 13 |
-d Dump compiled recipe to standard error\n"; |
| 14 |
exit 1; |
| 15 |
} |
| 16 |
|
| 17 |
my($template, %data) = @ARGV; |
| 18 |
my $style = new Biblio::EndnoteStyle(); |
| 19 |
$style->debug(1) if $opts{d}; |
| 20 |
print $style->format($template, \%data); |