Getting a sorted reference list or BibTeX entries from DOIs:
using Downloads
urls = [
"https://doi.org/10.1137/141000671",
"https://doi.org/10.1093/comjnl/27.2.97",
]
# replace "text/bibliography; style=apa" by "application/x-bibtex" for bibtex
result = @. String(take!(Downloads.download(urls,IOBuffer(),headers = ["Accept" => "text/bibliography; style=apa"])))
print(join(sort(result),"\n"))
This produces a consistently formatted reference list:
Bezanson, J., Edelman, A., Karpinski, S., & Shah, V. B. (2017). Julia: A Fresh Approach to Numerical Computing. SIAM Review, 59(1), 65â98. https://doi.org/10.1137/141000671
Knuth, D. E. (1984). Literate Programming. The Computer Journal, 27(2), 97â111. https://doi.org/10.1093/comjnl/27.2.97
Also useful with curl
in shell:
curl -LH "Accept: text/bibliography; style=apa" 'https://doi.org/10.1137/141000671'