Bib::CrossRef - Uses crossref to robustly parse bibliometric references.
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;
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.
Creates a new Bib::CrossRef object
$ref->parse_text($string)
Given a text string, Bib::CrossRef will try to resolve into a full citation with the help of crossref.org
$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.
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.
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.
my $info = $ref->genre
Returns the type of publication e.g. jounal paper, conference paper etc
my $info = $ref->date
Returns the year of publication
my $info = $ref->atitle
Returns the article title
my $info = $ref->jtitle
Returns the name of the journal (in long form)
my $info = $ref->authcount
Returns the number of authors
my $info = $ref->auth($num)
Get the name of author number $num (first author is $ref->auth(1))
my $info = $ref->volume
Returns the volume number in which paper appeared
my $info = $ref->issue
Returns the issue number in which paper appeared
my $info = $ref->spage
Returns the start page
my $info = $ref->epage
Returns the end page
Return the url, if any
my $info = $ref->query
Returns the free form string from which full citation is derived
print $ref->printheader;
Prints full citation in human readable form.
$ref->sethtml
Set output format to be html
$ref->clearhtml
Set output format to be plain text
When html formatting is enabled, prints some html header tags
print $ref->printfooter;
When html formatting is enabled, prints some html footer tags
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:
all
use Bib::CrossRef qw(:all);
Ver 0.09
Doug Leith
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.
bug-rrd-db at rt.cpan.org
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.
To install Bib::CrossRef, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bib::CrossRef
CPAN shell
perl -MCPAN -e shell install Bib::CrossRef
For more information on module installation, please visit the detailed CPAN module installation guide.