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

Mike Marchywka marchywka at hotmail.com
Wed May 19 02:55:39 CEST 2021


I was curious about researchgate, this took me forever lol.
This failed in zotero web form ( although btw, since updating headless chrome neither the Amazon
or LinkedIn pages will  create a DOM any more and no time to go back and fix it ... ) 

This failed in Zotero,

https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K

There seem to be 3 sources of bibtex entires here but I leave it up to the user to merge for now. I almost
always just take the first one ( don't use "all" option ). I did note though it looks like Zotero changes
the entry name to author and year pattern which may be nice.  For now though I just want a basic entry.
Even if my code failed, I can fix it but I can't go fix Zotero so that would shut me down.

I get this, 

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 guessresearchgate2 (rg) 
% date 2021-05-18:20:52:21 Tue May 18 20:52:21 EDT 2021
% srcurl: https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K
% citeurl: https://www.researchgate.net/lite.publication.PublicationDownloadCitationModal.downloadCitation.html?fileType=BibTeX&citation=citationAndAbstract&publicationUid=7305589
@article{articleMenadionemetaboliteThijssenHenkVervoort2006,
    author = {Thijssen, Henk and Vervoort, Lily and Schurgers, Leon and Shearer, Martin},
    doi = {10.1079/BJN20051630},
    journal = {The British journal of nutrition},
    month = {03},
    pages = {260-6},
    title = {Menadione is a metabolite of oral vitamin K},
    volume = {95},
    year = {2006},
url={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
srcurl={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
xsrcurl={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
citeurl={https://www.researchgate.net/lite.publication.PublicationDownloadCitationModal.downloadCitation.html?fileType=BibTeX&citation=citationAndAbstract&publicationUid=7305589}

}

% mjmhandler: toobib handledoi
% date 2021-05-18:20:52:22 Tue May 18 20:52:22 EDT 2021
% srcurl: https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K
% citeurl: http://api.crossref.org/works/10.1079/BJN20051630/transform/application/x-bibtex
@article{Thijssen_2006,
	doi = {10.1079/bjn20051630},
	url = {https://doi.org/10.1079%2Fbjn20051630},
	year = 2006,
	month = {feb},
	publisher = {Cambridge University Press ({CUP})},
	volume = {95},
	number = {2},
	pages = {260--266},
	author = {Henk H. W. Thijssen and Lily M. T. Vervoort and Leon J. Schurgers and Martin J. Shearer},
	title = {Menadione is a metabolite of oral vitamin K},
	journal = {British Journal of Nutrition},
srcurl={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
xsrcurl={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
citeurl={http://api.crossref.org/works/10.1079/BJN20051630/transform/application/x-bibtex}

}

% mjmhandler: toobib handledoixml
% date 2021-05-18:20:52:32 Tue May 18 20:52:32 EDT 2021
% srcurl: https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K
% citeurl: http://api.crossref.org/works/10.1079/BJN20051630/transform/application/x-bibtex
@article{Thijssen_2006,
	doi = {10.1079/bjn20051630},
	url = {https://doi.org/10.1079%2Fbjn20051630},
	year = 2006,
	month = {feb},
	publisher = {Cambridge University Press ({CUP})},
	volume = {95},
	number = {2},
	pages = {260--266},
	author = {Henk H. W. Thijssen and Lily M. T. Vervoort and Leon J. Schurgers and Martin J. Shearer},
	title = {Menadione is a metabolite of oral vitamin K},
	journal = {British Journal of Nutrition},
srcurl={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
xsrcurl={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
citeurl={http://api.crossref.org/works/10.1079/BJN20051630/transform/application/x-bibtex}

}

% mjmhandler: toobib handlegsmeta(scraper)
% date 2021-05-18:20:52:35 Tue May 18 20:52:35 EDT 2021
% srcurl: https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K
% citeurl: https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K
@article{MenadionemetaboliteHenkThijssen2006,
abstract_html_url = {https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
authors = {Henk H W Thijssen and  Lily M T Vervoort and  Leon J Schurgers and  Martin J Shearer},
date = {2006/03/01},
day = {01},
doi = {10.1079/BJN20051630},
fulltext_html_url = {https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
issn = {0007-1145},
issue = {2},
journal = {British Journal Of Nutrition},
month = {03},
pages = {260-6},
pdf_url = {https://www.researchgate.net/profile/Leon-Schurgers/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K/links/0fcfd5079598558469000000/Menadione-is-a-metabolite-of-oral-vitamin-K.pdf},
pmid = {16469140},
publisher = {Cambridge University Press (CUP)},
title = {Menadione is a metabolite of oral vitamin K},
volume = {95},
year = {2006},
url={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
srcurl={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
xsrcurl={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K},
citeurl={https://www.researchgate.net/publication/7305589_Menadione_is_a_metabolite_of_oral_vitamin_K}

}


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





note new address
 Mike Marchywka 306 Charles Cox Drive Canton, GA 30115
 2295 Collinworth  Drive Marietta GA 30062.  formerly 487 Salem Woods Drive Marietta GA 30067 404-788-1216 (C)<- leave message 989-348-4796 (P)<- emergency


________________________________________
From: texhax <texhax-bounces+marchywka=hotmail.com at tug.org> on behalf of Mike Marchywka <marchywka at hotmail.com>
Sent: Wednesday, May 12, 2021 5:37 PM
To: Jonathan Fine
Cc: TeXhax
Subject: Re: Generating bibtex entry from a URL: zotero, zbib and TooBib.

This form  https://zbib.org/
is giving me an error on this link,

https://core.ac.uk/download/pdf/82352096.pdf

Is there a trick to getting it to work?  If its a real error however they may notice
it and fix it by the time you get there as it should be easy if they do this all the time.

The reason I tried it is my code was failing due to a botched hack but now works,
% mjmhandler: toobib guesscoreac
% date 2021-05-12:17:18:31 Wed May 12 17:18:31 EDT 2021
% srcurl: https://core.ac.uk/download/pdf/82352096.pdf
% citeurl: http://api.crossref.org/works/10.1016/S0014-5793(99)00131-3/transform/application/x-bibtex
@article{Vo_1999,
        doi = {10.1016/s0014-5793(99)00131-3},
        url = {https://doi.org/10.1016%2Fs0014-5793%2899%2900131-3},
        year = 1999,
        month = {feb},
        publisher = {Wiley},
        volume = {445},
        number = {2-3},
        pages = {256--260},
        author = {Hung C Vo and Philip Britz-Mckibbin and David D.Y Chen and Ross T.A MacGillivray},
        title = {Undercarboxylation of recombinant prothrombin revealed by analysis of $\upgamma$-carboxyglutamic acid using capillary electrophoresis and laser-induced fluorescence},
        journal = {{FEBS} Letters},
srcurl={https://core.ac.uk/download/pdf/82352096.pdf},
xsrcurl={https://core.ac.uk/download/pdf/82352096.pdf},
citeurl={http://api.crossref.org/works/10.1016/S0014-5793(99)00131-3/transform/application/x-bibtex}

}

My validator did not recognize the "upgamma" so I just edited it and it was ok.

I'm almost to the point of developing a language for this as there are several common operations
on the url's or contents. In this case, it has to extract a number to go get the doi and use crossref
The doi is extracted with html and json parsers lol,
const StrTy doi=
        MutateOnly(StrTy(b),
 StrTy("testHTML --mjmflags 0 -mjm \"")+fnq+"\"  | grep  \"{\" | tail -n 1 | sed -e 's/[^{]*//' | mjsonu.out -cmd \"sax-json\"  | grep \"identifiers=doi\" | head -n 1  | sed -e 's/.*doi://'",out);


I started looking at my code again to try to implement "BoMTex" and a BioTex or similar to find a biography to
cite a specific person ( using info from say a linkedin profile ). For BomTex I may be able to get enough info from the
Amazon product and store pages. Headless chrome seems to work ok for getting the DOM and it uses my credentials
just fine.






Thanks.






note new address
 Mike Marchywka 306 Charles Cox Drive Canton, GA 30115
 2295 Collinworth  Drive Marietta GA 30062.  formerly 487 Salem Woods Drive Marietta GA 30067 404-788-1216 (C)<- leave message 989-348-4796 (P)<- emergency


________________________________________
From: Jonathan Fine <jfine2358 at gmail.com>
Sent: Wednesday, May 5, 2021 11:10 AM
To: Mike Marchywka
Cc: TeXhax
Subject: Re: Generating bibtex entry from a URL: zotero, zbib and TooBib.

Hi Mike

Regarding https://zbib.org/ you wrote

 I'll try their web interface on a few examples when I get a chance
and post any interesting comparisons.    Maybe they do a better job
than google scholar :)

Thank you for offering to do this. I'd find it useful.

with best regards

Jonathan




More information about the texhax mailing list.