bibpy.entry.comment module

Class representing a comment entry (@comment) in a bib file.

class bibpy.entry.comment.Comment(value)[source]

Bases: bibpy.entry.base.BaseEntry

A comment entry (@comment) in a bib file.

aliases(format)[source]

Return any aliases of this entry.

bibkey

Return the key of this entry.

bibtype

Return the entry type of this entry.

fields

Return a list of this entry’s active bib(la)tex fields.

Active fields are fields that are not None or empty strings.

format(indent=' ', singleline=True, braces=True, **kwargs)[source]

Format an return the comment entry as a string.

If singleline is True, put the entry on a single line. The contents of the preamble is indented by the indent argument if singleline is True.

If braces is True, surround the entry by braces else parentheses.

The kwargs are ignored for this entry type as there is no additional formatting.

valid(format)[source]

Return True if all required fields are present, False otherwise.

value

Return the value of the variable of the preamble.