File: complexparser.pl

package info (click to toggle)
libbiblio-citation-parser-perl 1.10%2Bdfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 660 kB
  • sloc: perl: 3,793; sh: 51; makefile: 2
file content (20 lines) | stat: -rwxr-xr-x 777 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl 
use Biblio::Citation::Parser::Standard;

# Get a little extra info out of the metadata.

$ref = "Jewell, M (2002) Making Examples for Reference Parsers. Journal of Example Writing 3:100-150.";

print "- Parsing '$ref'\n"; 
my $cit_parser = new Biblio::Citation::Parser::Standard;
$metadata = $cit_parser->parse($ref);
print "- Metadata follows:\n";
print "First name: ".$metadata->{aufirst}."\n";
print "Last name: ".$metadata->{aulast}."\n";
print "Title: ".$metadata->{atitle}."\n";
print "Publication: ".$metadata->{title}."\n";
print "Year: ".$metadata->{year}."\n";
print "Issue: ".$metadata->{issue}."\n";
print "Page range: ".$metadata->{pages}."\n";
print "Matched template: ".$metadata->{match}."\n";
print "Marked result: ".$metadata->{marked}."\n";