API

TeXfile

A class representing a BibTeX file

__init__()

Initialisation

Todo

Extract DB entries and set them up as Python definitions?

_splitHTMLaware(what)

Splits the given string at ';' and ',', assuring that a split is not done if the occured ';' belongs to a HTML-encoded special character

Parameters:
  • what (str) –

    The string to split

Returns:
  • List[str]

    The split string

read2string(file, skipComments=True, convertSpaces=True)

Reads the file optionally discarding comments and replacing tabs by spaces

Parameters:
  • file (str) –

    The name of the file to read

  • skipComments (bool, default: True ) –

    Whether comments shall be removed

  • convertSpaces (bool, default: True ) –

    Whether tabs shall be converted to spaces

Returns:
  • str

    The file contents, optionally stripped and without tabs