API

HTMLexportingTeXhandler

A BibTex handler that exports entries as HTML.

__init__(fdo)

Constructor

Parameters:
  • fdo (file descriptor) –

    The file to write to

startDocument()

Called at the begin of a document's processing

addStringDefinition(key, value)

Adds the definition of a string

Parameters:
  • key (str) –

    The shortcut for the string.

  • value (str) –

    The value of the string.

addComment(key, value)

Adds a comment

Parameters:
  • key (str) –

    The name of the comment?

  • value (str) –

    The value of the comment

todo: Check semantics

startEntry(entryID)

Called if a new entry is started to being parsed.

Parameters:
  • entryID (str) –

    The ID (key) of the entry

addField(entryID, key, value)

Called if a new attribute of an entry shall be added.

Parameters:
  • entryID (str) –

    The ID (key) of the entry

  • key (str) –

    The name of the attribute

  • value (str) –

    The value of the attribute

addField2(entryID, key, pairs)

Called if a new attribute consisting of multiple named fields shall be added.

This is only used when parsing JabRef file-fields.

Parameters:
  • entryID (str) –

    The ID (key) of the entry

  • key (str) –

    The name of the attribute

  • pairs (List[Tuple[str, str]]) –

    The value of the attribute

fillTemplate(tpl, fields)

Parses the template and fills it with the given values

Parameters:
  • tpl (str) –

    The entry-type specific template to fill

  • fields (dict) –

    The dictionary of the entry's attributes

Returns:
  • The template filled with the given values

closeEntry(entryID)

Closes the entry

Parameters:
  • entryID (str) –

    The ID (key) of the entry

endDocument()

Called after parsing a document