bib.bibtexparser.middlewares.block.entry_field_values_normalize¶
Classes¶
AddUrlToFieldValueInEntry ¶
Bases: BlockMiddleware
Add url link to title.
Source code in pybibtexer/bib/bibtexparser/middlewares/block/entry_field_values_normalize.py
NormalizeEntryFieldValues ¶
NormalizeEntryFieldValues(
field_keys=["journal", "booktitle"],
title_lower_upper="upper",
allow_inplace_modification=True,
)
Bases: BlockMiddleware
Normalize some field values (journal and booktitle) to upper case.
Source code in pybibtexer/bib/bibtexparser/middlewares/block/entry_field_values_normalize.py
NormalizeFieldValuesInEntry ¶
Bases: BlockMiddleware
Sentence field values.
Source code in pybibtexer/bib/bibtexparser/middlewares/block/entry_field_values_normalize.py
Functions¶
__generate_new_case_title ¶
Generate new title.
Source code in pybibtexer/bib/bibtexparser/middlewares/block/entry_field_values_normalize.py
__lower_first_letter_and_others_not_contain_uppers ¶
Lower.
Input: About; A; $about; ABOUT; aBOUT Output: about; a; $about; ABOUT; aBOUT
Source code in pybibtexer/bib/bibtexparser/middlewares/block/entry_field_values_normalize.py
__upper_first_letter_and_others_not_contain_uppers ¶
Upper.
Input: about; a; $about; ABOUT; abOUT Output: About; A; $about; ABOUT; abOUT
Source code in pybibtexer/bib/bibtexparser/middlewares/block/entry_field_values_normalize.py
__upper_or_lower_first_letter staticmethod ¶
Upper or lower first letter.
Check whether the first is in the a-zA-Z and then UPPER or LOWER it. flag = upper Input: about; $food; About; aBout Output: About; $food; About; ABout flag = lower Input: About; $food; about; ABout Output: about; $food; about; aBout
Source code in pybibtexer/bib/bibtexparser/middlewares/block/entry_field_values_normalize.py
generate_standard_sentence_case ¶
Generate standard title.
"Hello, world".upper() # HELLO WORLD "HELLO, WORLD".lower() # hello world "hello, world".capitalize() # Hello, world "hello, world".title() # Hello, World
Source code in pybibtexer/bib/bibtexparser/middlewares/block/entry_field_values_normalize.py
generate_standard_title_case ¶
Generate standard title.
"Hello, world".upper() # HELLO WORLD "HELLO, WORLD".lower() # hello world "hello, world".capitalize() # Hello, world "hello, world".title() # Hello, World