You are here

function _bibtex_import in Bibliography Module 5

1 call to _bibtex_import()
_biblio_import in ./biblio.module

File

./biblio.module, line 2997

Code

function _bibtex_import(&$data, $node) {
  require_once drupal_get_path('module', 'biblio') . '/bibtexParse/PARSEENTRIES.php';
  $node_array = array();

  // $bibtex = new Structures_BibTex();
  // $bibtex->loadString($data);
  $bibtex = new PARSEENTRIES();
  $bibtex
    ->loadBibtexString($data);
  $bibtex
    ->extractEntries();
  if ($bibtex->count) {
    $bibtex
      ->bib2node($node_array, $node);
    $node_ids = _biblio_save_imported_nodes($node_array);
  }
  return $node_ids;
}