Fork me on GitHub

BibDB: a BibTeX to DocBook translator

Translates BibTeX bibliographic entries to DocBook XML.

Latest version: 0.1.2

Features

BibDB uses BibTeX to generate XML data using a modified alpha style.

Here is a (slightly reformated) demonstration of BibDB:

% cat file.bib
@Book{au72,
  author =       {Alfred V. Aho and Jeffrey D. Ullman},
  editor =       {George Forsythe},
  title =        {The Theory of Parsing, Translation, and Compiling},
  publisher =    {Prentice Hall},
  year =         {1972},
  volume =       {I: Parsing},
  series =       {Series in Automatic Computation},
  address =      {Englewood Cliffs, New Jersey},
  isbn =         {0-13-914556-7}
}

@Article{decidability,
  author =       {H. B. {Hunt, III}},
  title =        {On the Decidability of Grammar Problems},
  journal =      {Journal of the ACM (JACM)},
  volume =       {29},
  number =       {2},
  year =         {1982},
  issn =         {0004-5411},
  pages =        {429--447},
  doi =          {http://doi.acm.org/10.1145/322307.322317},
  publisher =    {ACM Press},
}

@book{sippu-2,
  author =       {Seppo Sippu and Eljas Soisalon-Soininen},
  title =        {Parsing Theory},
  volume =       {II: {LR}($k$) and {LL}($k$) Parsing},
  series =       {EATCS Monographs on Theoretical Computer Science},
  publisher =    {Springer-Verlag},
  year =         {1990}
}
% bibdb file.bib > file.xml
Warning--can't use both author and editor fields in au72
(There was 1 warning)
% cat file.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<bibliography>

  <biblioentry role="book" id="au72">

    <abbrev id="au72.abbrev">AU72</abbrev>
    <authorgroup>
      <author>
        <firstname>Alfred V.</firstname>
        <surname>Aho</surname>

      </author>
      <author>
        <firstname>Jeffrey D.</firstname>
        <surname>Ullman</surname>
      </author>

    </authorgroup>
    <title>The Theory of Parsing, Translation, and Compiling</title>
    <subtitle role="series">Series in Automatic Computation</subtitle>
    <seriesvolnum>I: Parsing</seriesvolnum>

    <publisher>Prentice Hall</publisher>
    <address>Englewood Cliffs, New Jersey</address>
    <pubdate>1972</pubdate>
  </biblioentry>

  <biblioentry role="article" id="decidability">
    <abbrev id="decidability.abbrev">Hun82</abbrev>
    <biblioset role="article">
      <author><firstname>H. B.</firstname><surname>Hunt, III</surname></author>

      <title>On the decidability of grammar problems</title>
      <pagenums>429--447</pagenums>
      <bibliosource class="doi">http://doi.acm.org/10.1145/322307.322317</bibliosource>
    </biblioset>

    <biblioset role="journal">
      <title>Journal of the ACM (JACM)</title>
      <volumenum>29</volumenum><issuenum>2</issuenum>
      <pubdate>1982</pubdate>

    </biblioset>
  </biblioentry>

  <biblioentry role="book" id="sippu-2">
    <abbrev id="sippu-2.abbrev">SSS90</abbrev>
    <authorgroup>

      <author>
        <firstname>Seppo</firstname>
        <surname>Sippu</surname>
      </author>
      <author>

        <firstname>Eljas</firstname>
        <surname>Soisalon-Soininen</surname>
      </author>
    </authorgroup>
    <title>Parsing Theory</title>

    <subtitle role="series">EATCS Monographs on Theoretical Computer Science</subtitle>
    <seriesvolnum>II: LR(k) and LL(k) Parsing</seriesvolnum>
    <publisher>Springer-Verlag</publisher>
    <pubdate>1990</pubdate>

  </biblioentry>

</bibliography>
  

Requirements

Installation

Usage

bibdb [-e encoding] [-p preamble] file

-e
Specify the encoding used as in iconv(1). Defaults to iso-8859-1.
-p
Add a preamble to the generated file. For instance -p "<\!DOCTYPE bibliography PUBLIC \"-//OASIS/... >".
-v
Specify the version of docbook. Defaults to docbook4. -v 5 will change to docbook5.
file
Depending on the file extension:
  • If file is a LaTeX generated .aux file or a LaTeX .tex file, only generate entries for those present in the LaTeX source.
  • If file is a DocBook .xml file, only generate entries for those present in the DocBook file. It looks for .bib files in the directory holding file.
  • If file is a BibTeX .bib file, generate entries for the entire bibliography file.

Known Bugs

Author

Sylvain Schmitz <schmitz at i3s dot unice dot fr>

Copyright © 2004 Laboratoire I3S

Maintainer

Qingping Hou <qingping(dot)hou {AT} gmail(dot).com>

License

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 AUTHOR 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.