.. _bibble.util.selectors: ===================== bibble.util.selectors ===================== .. py:module:: bibble.util.selectors Classes ------- .. autoapisummary:: bibble.util.selectors.SelectAuthor bibble.util.selectors.SelectEntriesByType bibble.util.selectors.SelectN bibble.util.selectors.SelectTags Module Contents =============== .. _bibble.util.selectors.SelectAuthor: .. py:class:: SelectAuthor(*, authors) Bases: :py:obj:`bibtexparser.middlewares.middleware.LibraryMiddleware` TODO select entries by a set of authors should run name split on them .. py:method:: transform(library) -> :abstractmethod: Transform a library. :param library: Library to transform. :return: Transformed library. If the library should not be modified, return a copy of the original library. The returned library has to be a new instance, except if `self.allow_inplace_modification` is True (in which case the library may also return the original library). .. py:attribute:: _targets :type: set[str] .. _bibble.util.selectors.SelectEntriesByType: .. py:class:: SelectEntriesByType(*, targets = None) Bases: :py:obj:`bibtexparser.middlewares.middleware.LibraryMiddleware` Select entries of a particular type .. py:method:: transform(library) -> Transform a library. :param library: Library to transform. :return: Transformed library. If the library should not be modified, return a copy of the original library. The returned library has to be a new instance, except if `self.allow_inplace_modification` is True (in which case the library may also return the original library). .. py:attribute:: _entry_targets :type: list[str] .. py:attribute:: default_targets :value: ('article',) .. _bibble.util.selectors.SelectN: .. py:class:: SelectN(*, count = 1) Bases: :py:obj:`bibtexparser.middlewares.middleware.LibraryMiddleware` Select N random entries .. py:method:: transform(library) -> Transform a library. :param library: Library to transform. :return: Transformed library. If the library should not be modified, return a copy of the original library. The returned library has to be a new instance, except if `self.allow_inplace_modification` is True (in which case the library may also return the original library). .. py:attribute:: _count :value: 1 .. _bibble.util.selectors.SelectTags: .. py:class:: SelectTags(*, tags) Bases: :py:obj:`bibtexparser.middlewares.middleware.LibraryMiddleware` Select entries of with a particular tag .. py:method:: transform(library) -> Transform a library. :param library: Library to transform. :return: Transformed library. If the library should not be modified, return a copy of the original library. The returned library has to be a new instance, except if `self.allow_inplace_modification` is True (in which case the library may also return the original library). .. py:attribute:: _targets :type: set[str]