.. _bibble.files.path_writer: ======================== bibble.files.path_writer ======================== .. py:module:: bibble.files.path_writer .. autoapi-nested-parse:: See EOF for license/metadata/notes as applicable Type Aliases ------------ .. autoapisummary:: bibble.files.path_writer.Entry Classes ------- .. autoapisummary:: bibble.files.path_writer.PathWriter Module Contents =============== .. py:data:: Entry :type: TypeAlias :value: model.Entry .. _bibble.files.path_writer.PathWriter: .. py:class:: PathWriter(*, lib_root = None, **kwargs) Bases: :py:obj:`bibble.util.middlecore.IdenBlockMiddleware` Relativize library paths back to strings Can suppress errors from certain path roots on relativize, using MetaBlock data: MetaBlock(PathWriter.SuppressKey=[pl.Path()...]) .. py:method:: _suppress_relative_fail(val) -> .. py:method:: field_h(field, entry) -> .. py:method:: handle_meta_entry(library) -> An optional entry hook for middlewares, which is given the library's metablock before transform is called. Use case: conditionally setting PathWriter suppress paths .. py:method:: on_write() -> .. py:method:: transform_Entry(entry, library) -> .. py:attribute:: SuppressKey :value: 'PathWriter.suppress' .. py:attribute:: _lib_root :value: None .. py:attribute:: _suppress_in :type: list[pathlib.Path] .. py:attribute:: _whitelist :value: ('file',)