How to use the betterbib.Crossref 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_crossref.py View on Github external
def test_crossref_book0():
    source = betterbib.Crossref()

    test_entry = pybtex.database.Entry(
        "book",
        fields={
            "title": "Numerical Ordinary Differential Equations",
            "doi": "10.1002/0470868279",
        },
        persons={"author": [pybtex.database.Person("Butcher")]},
    )

    bt = source.find_unique(test_entry)

    reference = pybtex.database.Entry(
        "book",
        fields={
            "doi": "10.1002/0470868279",
github nschloe / betterbib / test / test_crossref.py View on Github external
def test_subtitle():
    source = betterbib.Crossref()

    test_entry = pybtex.database.Entry(
        "article",
        fields={
            "title": "tube",
            "doi": "10.1145/2377677.2377723",
            "journal": "ACM SIGCOMM Computer Communication Review",
            "issn": "0146-4833",
        },
        persons={
            "author": [
                pybtex.database.Person("Ha, Sangtae"),
                pybtex.database.Person("Sen"),
                pybtex.database.Person("Joe-Wong"),
                pybtex.database.Person("Im"),
                pybtex.database.Person("Chiang, Mung"),
github nschloe / betterbib / test / test_crossref.py View on Github external
def test_doi_only():
    source = betterbib.Crossref(prefer_long_journal_name=True)

    bt = source.get_by_doi("10.1137/110820713")
    reference = pybtex.database.Entry(
        "article",
        fields={
            "doi": "10.1137/110820713",
            "issn": "0895-4798, 1095-7162",
            "publisher": "Society for Industrial & Applied Mathematics (SIAM)",
            "title": "A Framework for Deflated and Augmented "
            + "Krylov Subspace Methods",
            "url": "http://dx.doi.org/10.1137/110820713",
            "journal": "SIAM Journal on Matrix Analysis and Applications",
            "number": "2",
            "month": 1,
            "volume": "34",
            "source": "Crossref",
github nschloe / betterbib / test / test_crossref.py View on Github external
def test_crossref_book0():

    source = betterbib.Crossref()

    test_entry = pybtex.database.Entry(
        'book',
        fields={
            'title': 'Numerical Ordinary Differential Equations',
            'doi': '10.1002/0470868279',
        },
        persons={'author': [
            pybtex.database.Person('Butcher'),
            ]}
        )

    bt = source.find_unique(test_entry)

    reference = pybtex.database.Entry(
        'book',
github nschloe / betterbib / test / test_crossref.py View on Github external
def test_crossref_incollection0():

    source = betterbib.Crossref()

    test_entry = pybtex.database.Entry(
        'incollection',
        fields={
            'title': 'Numerical continuation, ' +
                     'and computation of normal forms'
            },
        persons=pybtex.database.OrderedCaseInsensitiveDict({
            'author': [
                pybtex.database.Person(u'Beyn'),
                pybtex.database.Person(u'Champneys'),
                ]
            }))

    bt = source.find_unique(test_entry)
github nschloe / betterbib / tools / test-source.py View on Github external
def _main():
    # args = _parse_cmd_arguments()

    source = betterbib.Crossref()

    # t = time.time()
    _test_connection(source)
    # elapsed = time.time() - t
    # print("OK ({}s).".format(elapsed))
    # try:
    # except:
    #     print("FAILED.\n")
    #     raise
    return
github nschloe / betterbib / test / test_crossref.py View on Github external
def test_crossref_proceedings0():

    source = betterbib.Crossref()

    test_entry = pybtex.database.Entry(
        'proceedings',
        fields={
            'title': 'International Scientific Conference',
            'doi': '10.15611/amse.2014.17'
            }
        )

    bt = source.find_unique(test_entry)

    reference = pybtex.database.Entry(
        'proceedings',
        fields={
            'doi': u'10.15611/amse.2014.17',
            'source': u'Crossref',
github nschloe / betterbib / test / test_crossref.py View on Github external
def test_crossref_all_capitals():
    source = betterbib.Crossref()

    bt = source.get_by_doi("10.1142/s0218213009000366")
    reference = pybtex.database.Entry(
        "article",
        fields={
            "doi": "10.1142/s0218213009000366",
            "issn": "0218-2130, 1793-6349",
            "publisher": "World Scientific Pub Co Pte Lt",
            "title": "ONTOLOGICAL COGNITIVE MAP",
            "url": "http://dx.doi.org/10.1142/s0218213009000366",
            "journal": "Int. J. Artif. Intell. Tools",
            "number": "05",
            "month": 10,
            "volume": "18",
            "source": "Crossref",
            "year": 2009,
github nschloe / betterbib / test / test_crossref.py View on Github external
def test_crossref_book1():

    source = betterbib.Crossref()

    test_entry = pybtex.database.Entry(
        'book',
        fields={
            'title': 'Matrices, Moments and Quadrature with Applications',
        },
        persons={'author': [
            pybtex.database.Person('Golub'),
            pybtex.database.Person('Meurant'),
            ]}
        )

    bt = source.find_unique(test_entry)

    reference = pybtex.database.Entry(
        'book',