The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bib::CrossRef - Uses crossref to robustly parse bibliometric references.

SYNOPSIS

 use strict;
 use Bib::CrossRef;

# Create a new object

 my $ref = Bib::CrossRef->new();

# Supply some details, Bib::CrossRef will do its best to use this to derive full citation details e.g. the DOI of a document ...

 $ref->parse_text('10.1109/jstsp.2013.2251604');
 

# Show the full citation details, in human readable form

 print $ref->print();

 article: 2013, Alessandro Checco and Douglas J. Leith, 'Learning-Based Constraint Satisfaction With Sensing Restrictions'. IEEE Journal of Selected Topics in Signal Processing, 7(5),pp811-820, DOI: http://dx.doi.org/10.1109/jstsp.2013.2251604

# Show the full citation details, in html format

 $ref->sethtml;
 print $ref->printheader;
 print $ref->print;
 print $ref->printfooter;

EXAMPLES

A valid DOI will always be resolved to a full citation e.g.

 $ref->sparse_text('10.1109/jstsp.2013.2251604');
 print $ref->print();
 
 article: 2013, Alessandro Checco and Douglas J. Leith, 'Learning-Based Constraint Satisfaction With Sensing Restrictions'. IEEE Journal of Selected Topics in Signal Processing, 7(5),pp811-820, DOI: http://dx.doi.org/10.1109/jstsp.2013.2251604

An attempt will be made to resolve almost any text containing citation info e.g. article title only

 $ref->parse_text('Learning-Based Constraint Satisfaction With Sensing Restrictions');

e.g. author and journal

 $ref->parse_text('Alessandro Checco, Douglas J. Leith, IEEE Journal of Selected Topics in Signal Processing, 7(5)');

Please bear in mind that crossref provides a great service for free -- don't abuse it by making excessive queries. If making many queries, be sure to rate limit them to a sensible level or you will likely get blocked.

METHODS

new

 my $ref = Bib::CrossRef->new();

Creates a new Bib::CrossRef object

parse_text

 $ref->parse_text($string)

Given a text string, Bib::CrossRef will try to resolve into a full citation with the help of crossref.org

parse_doi

 $ref->parse_doi($doi)

Given a string containing a DOI e.g. 10.1109/tnet.2012.2202686, resolve into a full citation with the unixref interface of crossref.org. This should be definitive publishers DOI and is usually much as the same as calling $ref->parse_text($doi), but is included completeness.

doi

 my $info = $ref->doi

Returns a string containg the DOI (digital object identifier) field from a full citation. If present, this should be unique to the document.

score

 my $info = $ref->score

Returns a matching score from crossref.org. If less than 1, the text provided to set_details() was likely insufficient to allow the correct full citation to be obtained.

genre

 my $info = $ref->genre

Returns the type of publication e.g. jounal paper, conference paper etc

date

 my $info = $ref->date

Returns the year of publication

atitle

 my $info = $ref->atitle

Returns the article title

jtitle

 my $info = $ref->jtitle

Returns the name of the journal (in long form)

authcount

 my $info = $ref->authcount

Returns the number of authors

auth

 my $info = $ref->auth($num)

Get the name of author number $num (first author is $ref->auth(1))

volume

 my $info = $ref->volume

Returns the volume number in which paper appeared

issue

 my $info = $ref->issue

Returns the issue number in which paper appeared

spage

 my $info = $ref->spage

Returns the start page

epage

 my $info = $ref->epage

Returns the end page

url

Return the url, if any

query

 my $info = $ref->query
 

Returns the free form string from which full citation is derived

print

 print $ref->printheader;

Prints full citation in human readable form.

sethtml

 $ref->sethtml

Set output format to be html

clearhtml

 $ref->clearhtml

Set output format to be plain text

printheader

 print $ref->printheader;

When html formatting is enabled, prints some html header tags

printfooter

 print $ref->printfooter;

When html formatting is enabled, prints some html footer tags

EXPORTS

You can export the following functions if you do not want to use the object orientated interface:

parse_text parse_doi sethtml clearhtml set_details print printheader printfooter doi score date atitle jtitle volume issue genre spage epage authcount auth query url

The tag all is available to easily export everything:

use Bib::CrossRef qw(:all);

VERSION

Ver 0.09

AUTHOR

Doug Leith

BUGS

Please report any bugs or feature requests to bug-rrd-db at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Bib-CrossRef. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT

Copyright 2015 D.J.Leith.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.