Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"author": [
pybtex.database.Person("Gaul, Andr\xe9"),
pybtex.database.Person("Gutknecht, Martin H."),
pybtex.database.Person("Liesen, J\xf6rg"),
pybtex.database.Person("Nabben, Reinhard"),
]
}
),
)
assert betterbib.pybtex_to_bibtex_string(
bt, "key", sort=True
) == betterbib.pybtex_to_bibtex_string(reference, "key", sort=True)
assert (
betterbib.tools.get_short_doi(betterbib.tools.doi_from_url(bt.fields["url"]))
== "10/f44kd7"
)
'year': 2013,
'month': 1,
},
persons=pybtex.database.OrderedCaseInsensitiveDict({
'author': [
pybtex.database.Person(u'Gaul, Andr\xe9'),
pybtex.database.Person(u'Gutknecht, Martin H.'),
pybtex.database.Person(u'Liesen, J\xf6rg'),
pybtex.database.Person(u'Nabben, Reinhard')
]
}))
assert betterbib.pybtex_to_bibtex_string(bt, 'key') \
== betterbib.pybtex_to_bibtex_string(reference, 'key')
assert betterbib.tools.get_short_doi(
betterbib.tools.doi_from_url(bt.fields['url'])
) == '10/f44kd7'
return
def update_to_short_doi(doi):
short_doi = tools.get_short_doi(doi)
if short_doi:
return "https://doi.org/" + short_doi
return None