bibble.people.name_reader

See EOF for license/metadata/notes as applicable

Type Aliases

Block

Classes

NameReader

A Refactored version of bibtexparser's SplitNameParts and SeparateCoAuthors

_NameToParts_m

Adapted from bibtexparser's parse_single_name_into_parts, originally by Blair Bonnett.

_SplitAuthors_m

Adapated from bibtexparser's split_multiple_persons_names, originally by Blair Bonnett

Module Contents

bibble.people.name_reader.Block: TypeAlias = model.Block
class bibble.people.name_reader.NameReader(
*,
parts=True,
authors=True,
**kwargs,
)[source]

Bases: bibble.util.middlecore.IdenBlockMiddleware

A Refactored version of bibtexparser’s SplitNameParts and SeparateCoAuthors

Parameters:
field_h(field, entry) <Unknown>[source]
Parameters:
  • field (Field)

  • entry (Entry)

Return type:

jgdv.Result[list[Field], Exception]

on_read() <Unknown>[source]
transform_Entry(entry, library) <Unknown>[source]
Parameters:
  • entry (Entry)

  • library (bibtexparser.library.Library)

Return type:

list[Entry]

_do_name_parts = True
_do_split_authors = True
_whitelist = ('author', 'editor', 'translator')
class bibble.people.name_reader._NameToParts_m[source]

Adapted from bibtexparser’s parse_single_name_into_parts, originally by Blair Bonnett.

Parses an individual name into a NameParts_d, a simple data structure containing: - first : list. First names. - von : list. - last : list. Last Names. - jr : list.

Bibtex Names are of one of the forms: - first von last - von last, first - von last, jr, first

_build_parts_parser() <Unknown>[source]
Return type:

Parser

_first_von_last(p0, cases) <Unknown>[source]
Return type:

bibble.util.name_parts.NameParts_d

_name_to_parts(val, *, strict=True) <Unknown>[source]
Parameters:

val (str)

Return type:

bibble.util.name_parts.NameParts_d

_parse_name_fsm(val, *, strict=True) <Unknown>[source]
Return type:

tuple[list, list]

_parse_name_pp(val, *, strict=True) <Unknown>[source]

TODO

Return type:

tuple[list, list]

_von_last_first(sections, cases) <Unknown>[source]
Return type:

bibble.util.name_parts.NameParts_d

class bibble.people.name_reader._SplitAuthors_m[source]

Adapated from bibtexparser’s split_multiple_persons_names, originally by Blair Bonnett

Splits names by intermediary ‘and’s. Like its original, treats non-breaking space and ‘~’s as regular chars not whitespace.

‘and’s within braces are returned un modified. eg: ‘{Simon and Schuster}’ -> [‘{Simon and Schuster}’]

_build_split_parser() <Unknown>[source]
Return type:

Parser

_split_authors(val, *, strict=True) <Unknown>[source]
Parameters:

val (str)

Return type:

list[str]

_split_authors_fsm(
val,
*,
strict=True,
) <Unknown>[source]
Parameters:

val (str)

Return type:

list[str]

_split_authors_pp(
val,
*,
strict=True,
) <Unknown>[source]

TODO

Parameters:

val (str)

Return type:

list[str]