Publication lists with HAL and bibtexbrowser

by Martin Monperrus
Hal is an open-access archive, similar to Arxiv. It is funded and maintained by French institutions such as CNRS and INRIA. Researchers of French government-funded research bodies are encouraged to provide the world with open-access versions of their papers through HAL. bibtexbrowser is a tool to display and browse publication lists.

To browse a publication list with bibtexbrowser

First download the latest version of bibtexbrowser.
Second create an URL for bibtex export of the form:
https://haltools.inria.fr/Public/exportPubli.php?auteur_exp=martin%2Cmonperrus&format_export=bibtex&langue=Anglais&CB_accent_latex=oui

Finally create a file called bibtexbrowser.local.php, containing the following code:

<?
define('REMOTE_BIBTEX', 'http://haltools.inria.fr/Public/exportPubli.php?...');

/** updates the cache of this url and returns the filename of the cached version */
function update_cache($url) {
  $local_file = 'cache_'.md5($url).'.bib';
  // updates the cache once a day
  if (!file_exists($local_file) || time()-filemtime($local_file)>3600*24) {
    file_put_contents($local_file, file_get_contents($url));
  }
  return $local_file;     
}

$local_file = update_cache(REMOTE_BIBTEX);

if (!isset($_GET['bib'])) {
  $_GET['bib'] = $local_file;
}
?>
bibtexbrowser.local.php is automaticaly loaded by bibtexbrowser.

To embed a publication list with HAL and bibtexbrowser

Same bibtexbrowser.local.php as above, plus either:
<iframe src="http://www.monperrus.net/martin/bibtexbrowser.php?all"></iframe>  
or, if already using php:
<?
  $_GET['all'] = 1;
  $_GET['academic'] = 1;
  include( 'bibtexbrowser.php');
?>
See bibtexbrowser for more info on possible bibtexbrowser queries.



Tagged as: