bib2x

TeXhandler.HTML

API

HTMLexportingTeXhandler

A BibTex handler that exports entries as HTML.

__init__(fdo)

Constructor

Parameters:

Name Type Description Default
fdo file descriptor

The file to write to

required

startDocument()

Called at the begin of a document's processing

addStringDefinition(key, value)

Adds the definition of a string

Parameters:

Name Type Description Default
key str

The shortcut for the string.

required
value str

The value of the string.

required

addComment(key, value)

Adds a comment

Parameters:

Name Type Description Default
key str

The name of the comment?

required
value str

The value of the comment

required

todo: Check semantics

startEntry(entryID)

Called if a new entry is started to being parsed.

Parameters:

Name Type Description Default
entryID str

The ID (key) of the entry

required

addField(entryID, key, value)

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

Parameters:

Name Type Description Default
entryID str

The ID (key) of the entry

required
key str

The name of the attribute

required
value str

The value of the attribute

required

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:

Name Type Description Default
entryID str

The ID (key) of the entry

required
key str

The name of the attribute

required
pairs List[Tuple[str, str]]

The value of the attribute

required

fillTemplate(tpl, fields)

Parses the template and fills it with the given values

Parameters:

Name Type Description Default
tpl str

The entry-type specific template to fill

required
fields dict

The dictionary of the entry's attributes

required

Returns:

Type Description

The template filled with the given values

closeEntry(entryID)

Closes the entry

Parameters:

Name Type Description Default
entryID str

The ID (key) of the entry

required

endDocument()

Called after parsing a document