Skip to content

bib.bibtexparser.middlewares.block.entry_field_keys_replace

Classes

ReplaceFieldKeyInEntry

ReplaceFieldKeyInEntry(
    entry_type,
    old_field_keys,
    new_field_keys,
    allow_inplace_modification=True,
)

Bases: BlockMiddleware

Replace field key by user.

Source code in pybibtexer/bib/bibtexparser/middlewares/block/entry_field_keys_replace.py
def __init__(
    self,
    entry_type: str,
    old_field_keys: list[str],
    new_field_keys: list[str],
    allow_inplace_modification: bool = True,
):
    super().__init__(allow_inplace_modification=allow_inplace_modification, allow_parallel_execution=True)

    self.entry_type = entry_type
    self.old_field_keys = old_field_keys
    self.new_field_keys = new_field_keys