How to use the betterbib.decode function in betterbib

To help you get started, we’ve selected a few betterbib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nschloe / betterbib / test / test_tools.py View on Github external
def test_decode_doi():
    doi = "10.1007/978-1-4615-7419-4_6"
    d = pybtex.database.Entry(
        "misc", fields=[("doi", doi), ("note", "Online; accessed 19-February-2019")]
    )
    out = betterbib.decode(d)
    assert out.fields["doi"] == doi
github nschloe / betterbib / test / test_tools.py View on Github external
def test_decode():
    url = "https://www.wolframalpha.com/input/?i=integrate+from+0+to+2pi+(cos(x)+e%5E(i+*+(m+-+n)+*+x))"
    entry = pybtex.database.Entry(
        "misc", fields=[("url", url), ("note", "Online; accessed 19-February-2019")]
    )
    out = betterbib.decode(entry)
    assert out.fields["url"] == url