Bibtex Parser

A parser for BibTex files, implemented using NimbleParsec. Currently work in progress. Missing features are shown below.

Example

defmodule BibtexParser do
  import BibTex.Parser

  def example do
    input = """
    @techreport{agha1985actors,
    title={Actors: A model of concurrent computation in distributed systems.},
    author={Agha, Gul A},
    year={1985},
    institution={MASSACHUSETTS INST OF TECH CAMBRIDGE ARTIFICIAL INTELLIGENCE LAB}
    }

    """

    result = parse_entry(input)

    # => {:ok,
    #  %{
    #    label: 'agha1985actors',
    #    tags: [
    #      title: 'Actors: A model of concurrent computation in distributed systems.',
    #      author: 'Agha, Gul A',
    #      year: '1985',
    #      institution: 'MASSACHUSETTS INST OF TECH CAMBRIDGE ARTIFICIAL INTELLIGENCE LAB'
    #    ],
    #    type: 'techreport'
    #  }}
  end
end

Missing features

Installation

If available in Hex, the package can be installed by adding bibtex_parser to your list of dependencies in mix.exs:

def deps do
  [
    {:bibtex_parser, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/bibtex_parser.