Skip to content

Instantly share code, notes, and snippets.

@amitaibu
Created June 26, 2013 12:29
Show Gist options
  • Save amitaibu/5867013 to your computer and use it in GitHub Desktop.
Save amitaibu/5867013 to your computer and use it in GitHub Desktop.
<?php
$style_name = 'bibtex';
ctools_include('plugins');
$plugin = biblio_get_biblio_style($style_name);
$class = ctools_plugin_load_class('biblio', 'biblio_style', $style_name, 'class');
$biblio_style = new $class($plugin);
$data = '
@Book{abramowitz+stegun,
author = "Milton {Abramowitz} and Irene A. {Stegun}",
title = "Handbook of Mathematical Functions with
Formulas, Graphs, and Mathematical Tables",
publisher = "Dover",
year = 1964,
address = "New York",
edition = "ninth Dover printing, tenth GPO printing"
}';
$output = $biblio_style->import($data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment