Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _write(od, out, delimeter_type):
# Write header to the output file.
out.write(
"%comment{{This file was created with betterbib v{}.}}\n\n".format(
__about__.__version__
)
)
# write the data out sequentially to respect ordering
for bib_id, d in od.items():
brace_delimeters = delimeter_type == "curly"
a = tools.pybtex_to_bibtex_string(d, bib_id, brace_delimeters=brace_delimeters)
out.write(a + "\n\n")
return
def main(argv=None):
parser = _get_parser()
args = parser.parse_args(argv)
source = crossref.Crossref()
entry = source.get_by_doi(args.doi)
bibtex_key = "key"
string = tools.pybtex_to_bibtex_string(entry, bibtex_key)
args.outfile.write(string)
return