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:
<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.
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 this page about templates
Development¶ ↑
Source Repository¶ ↑
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
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
-
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.
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.
The MIT License (MIT)
Copyright © 2013 Charles Sutton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Other stuff¶ ↑
- 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.
Warranty¶ ↑
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.