Skip to content

bib.bibtexparser.middlewares.library.keeping_blocks

Classes

KeepEntriesByCiteKey

KeepEntriesByCiteKey(
    entry_keys, allow_inplace_modification=True
)

Bases: LibraryMiddleware

Keep the entries of a library by Cite Key.

The entry.key is also Cite Key.

Source code in pybibtexer/bib/bibtexparser/middlewares/library/keeping_blocks.py
def __init__(self, entry_keys: list[str], allow_inplace_modification: bool = True):
    super().__init__(allow_inplace_modification=allow_inplace_modification)

    self.entry_keys = [e.lower() for e in entry_keys]