Generating bibtex entry from a URL: zotero, zbib and TooBib.

Mike Marchywka marchywka at hotmail.com
Fri May 14 14:54:09 CEST 2021


On Thu, May 13, 2021 at 11:23:09AM +0100, Jonathan Fine wrote:
>    Thank you Mike for finding and reporting this problem.

Also getting an error here, I had to fix my code too :)

https://www.nature.com/articles/1600670.pdf?origin=ppub

Nature used to return RIS info that you could convert to bib format.
I'm not sure that works consistently now. I have a bunch of mutate
url hacks but this mutation is slightly different from my list.
I ended up with 3 versions or 4 if you count the cheap html scraper
lol. I also found that the linkedin profiles should be usable with 
headless chrome as there is a json block with enough info to identify
a person in a bibliopgraphy as a source but not sure there is a scholarly
format for that ... 

toobib.out -legacy 2> aaaa
mjm>clip xxxx
./toobib.h524  cmd=clip p1=xxxx p2= flags=18 x.flag_to_string(flags,0)=show_trial paste_citation 
./mjm_med2bib_guesses.h916 % mjmhandler: toobib guessnature<-handledoi
% date 2021-05-14:08:48:15 Fri May 14 08:48:15 EDT 2021
% srcurl: https://www.nature.com/articles/1600670 https://www.nature.com/articles/1600670.pdf?origin=ppub
% citeurl: http://api.crossref.org/works/10.1038/sj.ejcn.1600670/transform/application/x-bibtex
@article{Jatoi_1998,
	doi = {10.1038/sj.ejcn.1600670},
	url = {https://doi.org/10.1038%2Fsj.ejcn.1600670},
	year = 1998,
	month = {dec},
	publisher = {Springer Science and Business Media {LLC}},
	volume = {52},
	number = {12},
	pages = {934--938},
	author = {A Jatoi and C Lennon and M O'Brien and SL Booth and J Sadowski and JB Mason},
	title = {Protein{\textendash}calorie malnutrition does not predict subtle vitamin K depletion in hospitalized patients},
	journal = {European Journal of Clinical Nutrition},
srcurl={https://www.nature.com/articles/1600670.pdf?origin=ppub},
xsrcurl={https://www.nature.com/articles/1600670},
citeurl={http://api.crossref.org/works/10.1038/sj.ejcn.1600670/transform/application/x-bibtex}

}


./mjm_med2bib_guesses.h924  saving to  df=xxxx
./mjm_med2bib_guesses.h938  have citation   nfound=1 cite=\cite{Jatoi_1998} something=1 paste_citation=1
mjm>clip xxxx all
./toobib.h524  cmd=clip p1=xxxx p2=all flags=15 x.flag_to_string(flags,0)=show_decisions show_trial keep_going collect_all 
./mjm_med2bib_guesses.h916 % mjmhandler: toobib guessnature<-handledoi
% date 2021-05-14:08:48:53 Fri May 14 08:48:53 EDT 2021
% srcurl: https://www.nature.com/articles/1600670 https://www.nature.com/articles/1600670.pdf?origin=ppub
% citeurl: http://api.crossref.org/works/10.1038/sj.ejcn.1600670/transform/application/x-bibtex
@article{Jatoi_1998,
	doi = {10.1038/sj.ejcn.1600670},
	url = {https://doi.org/10.1038%2Fsj.ejcn.1600670},
	year = 1998,
	month = {dec},
	publisher = {Springer Science and Business Media {LLC}},
	volume = {52},
	number = {12},
	pages = {934--938},
	author = {A Jatoi and C Lennon and M O'Brien and SL Booth and J Sadowski and JB Mason},
	title = {Protein{\textendash}calorie malnutrition does not predict subtle vitamin K depletion in hospitalized patients},
	journal = {European Journal of Clinical Nutrition},
srcurl={https://www.nature.com/articles/1600670.pdf?origin=ppub},
xsrcurl={https://www.nature.com/articles/1600670},
citeurl={http://api.crossref.org/works/10.1038/sj.ejcn.1600670/transform/application/x-bibtex}

}

% mjmhandler: toobib guessnature<-handledoixml
% date 2021-05-14:08:48:55 Fri May 14 08:48:55 EDT 2021
% srcurl: https://www.nature.com/articles/1600670 https://www.nature.com/articles/1600670.pdf?origin=ppub
% citeurl: http://api.crossref.org/works/10.1038/sj.ejcn.1600670/transform/application/x-bibtex
@article{Jatoi_1998,
	doi = {10.1038/sj.ejcn.1600670},
	url = {https://doi.org/10.1038%2Fsj.ejcn.1600670},
	year = 1998,
	month = {dec},
	publisher = {Springer Science and Business Media {LLC}},
	volume = {52},
	number = {12},
	pages = {934--938},
	author = {A Jatoi and C Lennon and M O'Brien and SL Booth and J Sadowski and JB Mason},
	title = {Protein{\textendash}calorie malnutrition does not predict subtle vitamin K depletion in hospitalized patients},
	journal = {European Journal of Clinical Nutrition},
srcurl={https://www.nature.com/articles/1600670.pdf?origin=ppub},
xsrcurl={https://www.nature.com/articles/1600670},
citeurl={http://api.crossref.org/works/10.1038/sj.ejcn.1600670/transform/application/x-bibtex}

}

% mjmhandler: toobib guessnature<-handlegsmeta(html)
% date 2021-05-14:08:48:57 Fri May 14 08:48:57 EDT 2021
% srcurl: https://www.nature.com/articles/1600670 https://www.nature.com/articles/1600670.pdf?origin=ppub
% citeurl: https://www.nature.com/articles/1600670
@article{ProteincaloriemalnutritiondoesJatoi,
article_type = {Article},
author_institution = {Adult Nutrition Support Service, New England Medical Center, Boston, USA Jean Mayer USDA Human Nutritional Research Center on Aging at Tufts University, Boston, USA Division of Clinical Nutrition, Tufts University School of Medicine, Boston, USA Adult Nutrition Support Service, New England Medical Center, Boston, USA Jean Mayer USDA Human Nutritional Research Center on Aging at Tufts University, Boston, USA Jean Mayer USDA Human Nutritional Research Center on Aging at Tufts University, Boston, USA Jean Mayer USDA Human Nutritional Research Center on Aging at Tufts University, Boston, USA Adult Nutrition Support Service, New England Medical Center, Boston, USA Jean Mayer USDA Human Nutritional Research Center on Aging at Tufts University, Boston, USA Division of Clinical Nutrition, Tufts University School of Medicine, Boston, USA},
authors = {A Jatoi and  C Lennon and  M O�Brien and  SL Booth and  J Sadowski and  JB Mason},
date = {1998/12},
doi = {10.1038/sj.ejcn.1600670},
fulltext_html_url = {https://www.nature.com/articles/1600670},
fulltext_world_readable = {},
issn = {1476-5640},
issue = {12},
journal = {European Journal of Clinical Nutrition},
journal_abbrev = {Eur J Clin Nutr},
language = {en},
online_date = {1998/12/17},
pages = {934-938},
pdf_url = {https://www.nature.com/articles/1600670.pdf},
publisher = {Nature Publishing Group},
title = {Protein�calorie malnutrition does not predict subtle vitamin K depletion in hospitalized patients},
volume = {52},
url={https://www.nature.com/articles/1600670.pdf?origin=ppub},
srcurl={https://www.nature.com/articles/1600670.pdf?origin=ppub},
xsrcurl={https://www.nature.com/articles/1600670},
citeurl={https://www.nature.com/articles/1600670}

}

% mjmhandler: toobib guessnature<-handlegsmeta(scraper)
% date 2021-05-14:08:48:57 Fri May 14 08:48:57 EDT 2021
% srcurl: https://www.nature.com/articles/1600670 https://www.nature.com/articles/1600670.pdf?origin=ppub
% citeurl: https://www.nature.com/articles/1600670
@article{Protein8211caloriemalnutritiondoesJatoi,
article_type = {Article},
author_institution = {Adult Nutrition Support Service, New England Medical Center, Boston, USA Jean Mayer USDA Human Nutritional Research Center on Aging at Tufts University, Boston, USA Division of Clinical Nutrition, Tufts University School of Medicine, Boston, USA Adult Nutrition Support Service, New England Medical Center, Boston, USA Jean Mayer USDA Human Nutritional Research Center on Aging at Tufts University, Boston, USA Jean Mayer USDA Human Nutritional Research Center on Aging at Tufts University, Boston, USA Jean Mayer USDA Human Nutritional Research Center on Aging at Tufts University, Boston, USA Adult Nutrition Support Service, New England Medical Center, Boston, USA Jean Mayer USDA Human Nutritional Research Center on Aging at Tufts University, Boston, USA Division of Clinical Nutrition, Tufts University School of Medicine, Boston, USA},
authors = {A Jatoi and  C Lennon and  M O#8217Brien and  SL Booth and  J Sadowski and  JB Mason},
date = {1998/12},
doi = {10.1038/sj.ejcn.1600670},
fulltext_html_url = {https://www.nature.com/articles/1600670},
fulltext_world_readable = {},
issn = {1476-5640},
issue = {12},
journal = {European Journal of Clinical Nutrition},
journal_abbrev = {Eur J Clin Nutr},
language = {en},
online_date = {1998/12/17},
pages = {934-938},
pdf_url = {https://www.nature.com/articles/1600670.pdf},
publisher = {Nature Publishing Group},
title = {Protein#8211calorie malnutrition does not predict subtle vitamin K depletion in hospitalized patients},
volume = {52},
url={https://www.nature.com/articles/1600670.pdf?origin=ppub},
srcurl={https://www.nature.com/articles/1600670.pdf?origin=ppub},
xsrcurl={https://www.nature.com/articles/1600670},
citeurl={https://www.nature.com/articles/1600670}

}


./mjm_med2bib_guesses.h924  saving to  df=xxxx
./mjm_med2bib_guesses.h938  have citation   nfound=4 cite=\cite{Jatoi_1998} something=1 paste_citation=0





>    On Wed, May 12, 2021 at 10:37 PM Mike Marchywka <[mailto:marchywka at hotmail.com]marchywka at hotmail.com> wrote:
> 
>      This form  [https://zbib.org/]https://zbib.org/
>      is giving me an error on this link,
>      [https://core.ac.uk/download/pdf/82352096.pdf]https://core.ac.uk/download/pdf/82352096.pdf
>      Is there a trick to getting it to work?
> 
>    It also gives an error for me, both via [http://zbib.org/]zbib.org and via the zotero browser plugin. However, this one
>    works on both [http://zbib.org/]zbib.org and the plugin:
>    [https://arxiv.org/pdf/2104.12015.pdf]https://arxiv.org/pdf/2104.12015.pdf
>    With the plugin I get the error message: This item could not be saved because Zotero is not open or is unreachable. Please
>    open Zotero and try again.
>    I suspect that there is an error, but not the one just reported.
>    --
>    Jonathan

-- 

mike marchywka
306 charles cox
canton GA 30115
USA, Earth 
marchywka at hotmail.com
404-788-1216
ORCID: 0000-0001-9237-455X


More information about the texhax mailing list.