SYNOPSIS

  use RefDB::Pubmed;
  my $infile = "-";

  my $pm = new RefDB::Pubmed;

  $pm->in($infile);

  while ((my $set = $pm->next_pubmed_set())) {
      $set->parse_pmset();
      $set->convert_pmset();
      $set->dump_pmset_as_ris();
  }

DESCRIPTION

RefDB::Pubmed allows one to convert Pubmed/Medline bibliographic data to the \s-1RIS\s0 format understood by RefDB and most other bibliographic software. Data can be provided as a string or they can be read from a file/stream.

FEEDBACK

Send bug reports, questions, and comments to the refdb-users mailing list at:

[email protected]

For list information and archives, please visit:

http://lists.sourceforge.net/lists/listinfo/refdb-users

AUTHOR

Markus Hoenicka, [email protected]

RELATED TO RefDB::Pubmed…

This module is part of the RefDB package, a reference manager and bibliography tool for markup languages. Please visit http://refdb.sourceforge.net for further information.

PMSet package

This helper package defines methods to deal with a Pubmed dataset

new

Title : new

Usage : $set = new PMset();

Function: Creates a new PMset object

parse_pmset

Title : parse_pmset

Usage : $set->parse_pmset();

Function: parses the raw tagged Pubmed data

convert_pmset

Title : convert_pmset()

Usage : $set->convert_pmset()

Function: Converts the parsed data to \s-1RIS\s0 data

dump_pmset_as_ris

Title : dump_pmset_as_ris

Usage : $set->dump_pmset_as_ris()

Function: Dumps the data as a valid \s-1RIS\s0 set

dump_pmset_as_pm

Title : dump_pmset_as_pm

Usage : $set->dump_pmset_as_pm()

Function: dumps the parsed data as a Pubmed set. The result differs from the input in that each tag with its associated data is always in a single line whereas the input data may contain continued lines w/o a tag. You can use this function to normalize the Pubmed tagged data.

_convert_tag

Title : _convert_tag

Usage : $self->_convert_tag($key, $string);

Function: Converts a Pubmed tag line to \s-1RIS\s0 and adds the result to a list

Argument: string containing the tag, something like '\s-1KW\s0 - '

          string containing the data associated with the tag

_split_mesh

Title : _split_mesh

Usage : $self->_split_mesh($string);

Function: splits a Pubmed \s-1MH\s0 line into one or more \s-1RIS\s0 \s-1KW\s0 lines

Argument: string containing the data associated with the \s-1MH\s0 tag

set_print_unmapped

Title : set_print_unmapped

Usage : $pm->set_print_unmapped\|(1)

Function: switch on or off printing of unmapped Pubmed tags

Argument: 0 (zero) to switch off or non-zero to switch on

set_converter

Title : set_converter

Usage : $pm->set_converter(\*(L"from_enc\*(R", \*(L"to_enc\*(R")

Function: creates the iconv character encoding converter to be used

Arguments: from_enc, to_enc: the encoding of the source data and of the output data, respectively

add_raw_line

Title : add_raw_line

Usage : $set->add_raw_line($_)

Function: adds a raw Pubmed line to the internal list

Argument: string containing a full Pubmed line

Pubmed package

This package defines functions to deal with collections of Pubmed datasets

new

Title : new

Usage : $pm = new RefDB::Pubmed();

Function: Creates a new Pubmed object

in

Title : in

Usage : $pm->in($filename)

Function: Opens a file or input stream for reading

Returns : A filehandle or undef if the stream could not be opened

Argument: The path of a file or the name of an input stream

string

Title : string

Usage : $pm->string($string)

Function: Accepts an input string for parsing

Returns : 1 if Pubmed data, 0 if not Argument: A string containing input data

next_pubmed_set

Title : next_pubmed_set

Usage : $pm->next_pubmed_set()

Function: Reads the next Pubmed dataset

Returns : A PMset containing the raw Pubmed tagged data, or undef if no data available

set_print_unmapped

Title : set_print_unmapped

Usage : $pm->set_print_unmapped\|(1)

Function: switch on or off printing of unmapped Pubmed tags

Argument: 0 (zero) to switch off or non-zero to switch on

set_encodings

Title : set_encodings

Usage : $pm->set_encodings(\*(L"from_enc\*(R", \*(L"to_enc\*(R")

Function: set encodings of input and output data

Argument: from_enc, to_enc according to \*(L"man iconv_open\*(R"