davidagraf/doi2bib2

Programmatic Access to Website?

YogiOnBioinformatics opened this issue ยท 9 comments

I love the website you have set up! ๐Ÿ™‚

Is there any way to programatically input a DOI and get the info back from your website to be able to parse?

@davidagraf sorry to bother but wanted to follow up on this.

adosar commented

I am also interested on this. Does anyone know a curl command that can do the job?

@davidagraf any response yet?

Unfortunately, we had to block programmatic access due to quota/budget limitations.

@YogiOnBioinformatics @adosar

Sorry if I am late to this, but you can achieve this using curl. Suppose you want to fetch the BibTeX entry for this paper, you just run the following:

$ curl -LH "Accept: application/x-bibtex" https://doi.org/10.1056/NEJMoa2001017

and you get

@article{Zhu_2020, title={A Novel Coronavirus from Patients with Pneumonia in China, 2019}, volume={382}, ISSN={1533-4406}, url={http://dx.doi.org/10.1056/NEJMoa2001017}, DOI={10.1056/nejmoa2001017}, number={8}, journal={New England Journal of Medicine}, publisher={Massachusetts Medical Society}, author={Zhu, Na and Zhang, Dingyu and Wang, Wenling and Li, Xingwang and Yang, Bo and Song, Jingdong and Zhao, Xiang and Huang, Baoying and Shi, Weifeng and Lu, Roujian and Niu, Peihua and Zhan, Faxian and Ma, Xuejun and Wang, Dayan and Xu, Wenbo and Wu, Guizhen and Gao, George F. and Tan, Wenjie}, year={2020}, month=feb, pages={727โ€“733} }

You can read more about DOI Content Negotiation here.

@kakumarabhishek this is brilliant!

Thanks so much!

@YogiOnBioinformatics @adosar

Sorry if I am late to this, but you can achieve this using curl. Suppose you want to fetch the BibTeX entry for this paper, you just run the following:

$ curl -LH "Accept: application/x-bibtex" https://doi.org/10.1056/NEJMoa2001017

and you get

@article{Zhu_2020, title={A Novel Coronavirus from Patients with Pneumonia in China, 2019}, volume={382}, ISSN={1533-4406}, url={http://dx.doi.org/10.1056/NEJMoa2001017}, DOI={10.1056/nejmoa2001017}, number={8}, journal={New England Journal of Medicine}, publisher={Massachusetts Medical Society}, author={Zhu, Na and Zhang, Dingyu and Wang, Wenling and Li, Xingwang and Yang, Bo and Song, Jingdong and Zhao, Xiang and Huang, Baoying and Shi, Weifeng and Lu, Roujian and Niu, Peihua and Zhan, Faxian and Ma, Xuejun and Wang, Dayan and Xu, Wenbo and Wu, Guizhen and Gao, George F. and Tan, Wenjie}, year={2020}, month=feb, pages={727โ€“733} }

You can read more about DOI Content Negotiation here.

Is it possible to pretty print this? Maybe it is related to this?