bib.bibtexbase.standardize.do_on_entry_block¶
Entry block standardization utilities.
This module provides comprehensive functionality for processing and standardizing BibTeX entry blocks. Entry blocks contain the actual bibliographic data and require the most complex processing including field validation, formatting, and error checking.
Classes:
| Name | Description |
|---|---|
StandardizeEntryBlock | Main class for standardizing BibTeX entry blocks with configurable field lists and comprehensive validation. |
EntryBase | Base class providing utility methods for field extraction and brace/quote detection. |
SplitEntry | Handles splitting of entry blocks based on field patterns. |
AppendEntry | Manages field appending and line continuation processing. |
ExtractEntry | Extracts and validates field content from entry blocks. |
CheckEntry | Performs final validation and error checking on entry blocks. |
Functions:
| Name | Description |
|---|---|
add_brace_or_quote | Utility function for ensuring proper brace/quote matching in field values. |
Classes¶
AppendEntry ¶
Append Patch Bib.
Source code in pybibtexer/bib/bibtexbase/standardize/do_on_entry_block.py
Functions¶
append_field staticmethod ¶
Append.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field_list | list[str] | Append field list. | required |
braces_or_quotes | tuple[str, str] | Brace or quote. | required |
block | list[str] | Data list. | required |
Returns:
| Type | Description |
|---|---|
list[str] | list[str]: new patch bib after appending. |
Source code in pybibtexer/bib/bibtexbase/standardize/do_on_entry_block.py
CheckEntry ¶
Functions¶
check staticmethod ¶
Check.
Source code in pybibtexer/bib/bibtexbase/standardize/do_on_entry_block.py
EntryBase ¶
Source code in pybibtexer/bib/bibtexbase/standardize/do_on_entry_block.py
Functions¶
obtain_braces_or_quotes staticmethod ¶
Obtain braces or quotes in block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block | list[str] | block. | required |
Returns:
| Type | Description |
|---|---|
tuple[str, str] | tuple[str, str]: the tuple of braces or quotes. |
Source code in pybibtexer/bib/bibtexbase/standardize/do_on_entry_block.py
obtain_fields ¶
Obtain fileds in block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block | list[str] | block. | required |
field_pattern | str = r'[\w\-]+' | field pattern. | '[\\w\\-]+' |
Returns:
| Type | Description |
|---|---|
list[str] | list[str]: field list. |
Source code in pybibtexer/bib/bibtexbase/standardize/do_on_entry_block.py
ExtractEntry ¶
Source code in pybibtexer/bib/bibtexbase/standardize/do_on_entry_block.py
Functions¶
extract ¶
Extract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field_list | list[str] | field list | required |
brace_or_quote | tuple[str, str] | (", ") or ({, }) | required |
block | list[str] | the block | required |
Return
tuple[list[str], list[str]]: main block, redundant part
Source code in pybibtexer/bib/bibtexbase/standardize/do_on_entry_block.py
StandardizeEntryBlock ¶
Stanndardize entry block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
default_additional_field_list | list[str] | None = None | Additional default fields. | None |
Attributes:
| Name | Type | Description |
|---|---|---|
default_fields_list | list[str] | Default fields. |