Skip to content

bib.bibtexparser.middlewares_str_to_str

Classes

MiddlewaresStrToStr

MiddlewaresStrToStr(options)

Middlewares for converting a string to a string.

Parameters:

Name Type Description Default
options dict

Options for the middlewares.

required

Attributes:

Name Type Description
substitute_in_bib bool

Substitute in the bib. Default is True.

substitute_old_list list

list of old strings to substitute. Default is [].

substitute_new_list list

list of new strings to substitute. Default is [].

Source code in pybibtexer/bib/bibtexparser/middlewares_str_to_str.py
def __init__(self, options: dict[str, Any]):
    self.substitute_in_bib = options.get("substitute_in_bib", True)
    self.substitute_old_list = options.get("substitute_old_list", [])
    self.substitute_new_list = options.get("substitute_new_list", [])