casutton / bibout

Formats BibTeX files into pretty files (e.g., HTML) using arbitrary templates.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 information and examples, see the documentation 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

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.

:include: LICENSE.md


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.

About

Formats BibTeX files into pretty files (e.g., HTML) using arbitrary templates.

License:MIT License


Languages

Language:Ruby 90.0%Language:TeX 10.0%