Skip to content

bib.bibtexparser.middlewares.utils

Classes

Functions

generate_entry_abbr

generate_entry_abbr(entry_type)

Generate abbr according to entry type.

zotero item type

['Journal Article', 'Conference Paper', 'Book', 'Book Section', 'Document', 'Manuscript', 'Report', 'Thesis', 'Thesis']

zotero export: ['article', 'inproceedings','book', 'incollection', 'misc', 'unpublished', 'techreport', 'phdthesis', 'masterthesis']

Source code in pybibtexer/bib/bibtexparser/middlewares/utils.py
def generate_entry_abbr(entry_type: str) -> str:
    """Generate abbr according to entry type.

    zotero item type:
        ['Journal Article', 'Conference Paper', 'Book', 'Book Section', 'Document', 'Manuscript', 'Report', 'Thesis',
         'Thesis']
    zotero export:
        ['article', 'inproceedings','book', 'incollection', 'misc', 'unpublished', 'techreport', 'phdthesis',
         'masterthesis']
    """
    entries = {k[0]: k[2] for k in MARKS_FLAGS if k[1] == "entry"}
    return entries.get(entry_type.lower(), "")