BibOut
This package contains BibOut, a simple tool to convert BibTeX files into HTML or other types of formatted text files.
The main feautre of BibOut is that it allows the user to specify a template for the output. The templating system is based on ERB, so it is very flexible.
Installation
Gem Installation
Download and install BibOut with the following.
gem install bibout
Usage
Simple Example
You will need a BibTeX file. Suppose that your file is called mine.bib and contains the entries
@article{robbins-monro,
Author = {Robbins, H. and Monro, S.},
Journal = {Annals of Mathematical Statistics},
Pages = {400--407},
Title = {A stochastic approximation method},
Volume = {22},
Year = {1951}}
@article{metropolis,
Author = {Metropolis, N. and Rosenbluth, A. and Rosenbluth, M. and Teller, A. and Teller, E.},
Journal = {J. Chem. Phys.},
Pages = {1087--1092},
Title = {Equations of state calculations by fast computing machines},
Volume = {21},
Year = {1953}}
Then you will need to create a template file that tells BibOut how to format your entries. Call this file template.tmpl
<html>
<body>
<ol>
<% bib.each do |entry| %>
<li><%= entry.year %>. <%= entry.author.pretty %></li>
<% end %>
</ol>
</body>
</html>
Finally, you can run bibout using
% ls
template.tmpl mine.bib
% bibout -t template.tmpl -o my-bib.html mine.bib
After running this command, the file my-bib.html will be created and will contain:
<li>1951. H. Robbins and S. Monro</li>
<li>1953. N. Metropolis, A. Rosenbluth, M. Rosenbluth, A. Teller and E. Teller</li>
</ol>
</body>
Type bibout --help
for more information about the command-line invocation.
Create Template Files
To use BibOut, the biggest thing that you need to do is to create the template file. The template file can contain arbitrary text and Ruby code. For more documentation about templates, including examples, see the templates documentation
Issues and Bug Reports
Feature requests and bug reports can be made here
Other BibTeX to HTML programs
There are many other BibTeX to HTML programs
- https://www.lri.fr/~filliatr/bibtex2html/ -- bibtex2html, a nice and well-documented tool
- http://tug.ctan.org/tex-archive/biblio/bibtex/utils/bib2ml/ -- bib2ml (CTAN)
- http://www.spinellis.gr/sw/textproc/bib2xhtml/ -- bib2xml
- http://sourceforge.net/p/bibutils/home/Bibutils/ -- bib2xml component of bibutils
If you know of others, please let me know and I shall be happy to add them to this list.
Credits
This project is basically a thin wrapper that combines bibtex-ruby by Sylvester Keil with ERB by Masatoshi SEKI.
Thanks also to Atsushi Nagase for the hanna-bootstrap RDoc template.
License
BibOut is available under an MIT-style license. See LICENSE.md in the source repository
Other stuff
BibOut is authored by Charles Sutton