bib2web/gscholar.py
def _get_bib_element(bibitem, element):
    """Return element from bibitem or None."""
    lst = [i.strip() for i in bibitem.split("\n")]
    for i in lst:
        if i.startswith(element):
            value = i.split("=", 1)[-1]
            value = value.strip()
            while value.endswith(','):
                value = value[:-1]
            while value.startswith('{') or value.startswith('"'):
                value = value[1:-1]
            return value
    return None
Return element from bibitem or None.
Return element from bibitem or None.
Return element from bibitem or None .
def _get_bib_element(bibitem, element):
    lst = [i.strip() for i in bibitem.split("\n")]
    for i in lst:
        if i.startswith(element):
            value = i.split("=", 1)[-1]
            value = value.strip()
            while value.endswith(','):
                value = value[:-1]
            while value.startswith('{') or value.startswith('"'):
                value = value[1:-1]
            return value
    return None
def _get_bib_element ( bibitem , element ) : lst = [ i . strip ( ) for i in bibitem . split ( "\n" ) ] for i in lst : if i . startswith ( element ) : value = i . split ( "=" , 1 ) [ - 1 ] value = value . strip ( ) while value . endswith ( ',' ) : value = value [ : - 1 ] while value . startswith ( '{' ) or value . startswith ( '"' ) : value = value [ 1 : - 1 ] return value return None
Return element from bibitem or None.
Return element from bibitem or None .
"""Return element from bibitem or None."""
bibitem
element