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.
Download and install BibOut with the following.
gem install bibout
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:
<html> <body> <ol> <li>1951. H. Robbins and S. Monro</li> <li>1953. N. Metropolis, A. Rosenbluth, M. Rosenbluth, A. Teller and E. Teller</li> </ol> </body> </html>
Type + bibout –help + for more information about the command-line invocation.
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 information and examples, see the documentation about templates
BibOut is currently hosted at github. The github web page is github.com/casutton/bibout . The public git clone URL is
-
git://github.com/casutton/bibout.git
Feature requests and bug reports can be made here
There are many other BibTeX to HTML programs
-
www.lri.fr/~filliatr/bibtex2html/ – bibtex2html, a nice and well-documented tool
-
tug.ctan.org/tex-archive/biblio/bibtex/utils/bib2ml/ – bib2ml (CTAN)
-
www.spinellis.gr/sw/textproc/bib2xhtml/ – bib2xml
-
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.
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.
BibOut is available under an MIT-style license.
:include: LICENSE.md
- Author
-
Charles Sutton <csutton@inf.ed.ac.uk>
- Requires
-
Ruby 1.8.7 or later
- License
-
Copyright 2013-2014 by Charles Sutton Released under an MIT-style license. See the LICENSE file included in the distribution.
This software is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.