bibble.files.path_writer
See EOF for license/metadata/notes as applicable
Type Aliases
Classes
Relativize library paths back to strings |
Module Contents
- bibble.files.path_writer.Entry: TypeAlias = model.Entry
- class bibble.files.path_writer.PathWriter(*, lib_root=None, **kwargs)[source]
Bases:
bibble.util.middlecore.IdenBlockMiddlewareRelativize library paths back to strings
Can suppress errors from certain path roots on relativize, using MetaBlock data: MetaBlock(PathWriter.SuppressKey=[pl.Path()…])
- Parameters:
lib_root (jgdv.Maybe[pathlib.Path])
- _suppress_relative_fail(val) <Unknown>[source]
- Parameters:
val (pathlib.Path)
- Return type:
- handle_meta_entry(library) <Unknown>[source]
An optional entry hook for middlewares, which is given the library’s metablock before transform is called.
Use case: conditionally setting PathWriter suppress paths
- Parameters:
library (bibtexparser.library.Library)
- transform_Entry(entry, library) <Unknown>[source]
- Parameters:
entry (Entry)
library (bibtexparser.library.Library)
- SuppressKey = 'PathWriter.suppress'
- _lib_root = None
- _suppress_in: list[pathlib.Path]
- _whitelist = ('file',)