bibble.util.selectors
Classes
TODO select entries by a set of authors |
|
Select entries of a particular type |
|
Select N random entries |
|
Select entries of with a particular tag |
Module Contents
- class bibble.util.selectors.SelectAuthor(*, authors)[source]
Bases:
bibtexparser.middlewares.middleware.LibraryMiddlewareTODO select entries by a set of authors
should run name split on them
- Parameters:
authors (collections.abc.Iterable[str])
- abstractmethod transform(library) <Unknown>[source]
Transform a library.
- Parameters:
library – Library to transform.
- Returns:
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).
- class bibble.util.selectors.SelectEntriesByType(*, targets=None)[source]
Bases:
bibtexparser.middlewares.middleware.LibraryMiddlewareSelect entries of a particular type
- Parameters:
targets (jgdv.Maybe[collections.abc.Iterable[str]])
- transform(library) <Unknown>[source]
Transform a library.
- Parameters:
library – Library to transform.
- Returns:
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).
- default_targets = ('article',)
- class bibble.util.selectors.SelectN(*, count=1)[source]
Bases:
bibtexparser.middlewares.middleware.LibraryMiddlewareSelect N random entries
- Parameters:
count (int)
- transform(library) <Unknown>[source]
Transform a library.
- Parameters:
library – Library to transform.
- Returns:
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).
- _count = 1
- class bibble.util.selectors.SelectTags(*, tags)[source]
Bases:
bibtexparser.middlewares.middleware.LibraryMiddlewareSelect entries of with a particular tag
- Parameters:
tags (collections.abc.Iterable[str])
- transform(library) <Unknown>[source]
Transform a library.
- Parameters:
library (bibtexparser.libary.Library) – Library to transform.
- Returns:
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).
- Return type:
bibtexparser.libary.Library