You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an API that we can download BibTeX entries for submitted analysis? When users use a certain analysis, I want to create a bib file so that they can properly cite everything they used; in InspireHEP, they have something similar. For instance, I can retrieve the bibtex entry like this:
The best implementation might be in terms of content negotiation as for the JSON-LD metadata format, i.e. BibTeX format could be returned for a record page with an HTTP header Accept: application/x-bibtex. This might require some refactoring of the HEPData code. Currently, the BibTeX format is written in cite-widget.html and is accessible only when a user clicks the "Cite" button in the top-right of a record page followed by selecting the "BibTeX" tab of the "Citing this record" widget.
In the meantime, it is fairly easy to scrape the HTML of a record page to get the BibTeX format. For example, using the Python requests and beautifulsoup4 packages:
@misc{hepdata.89413,
author = "{ATLAS Collaboration}",
title = "{Search for electroweak production of charginos and sleptons decaying into final states with two leptons and missing transverse momentum in $\sqrt{s}=13$ TeV $pp$ collisions using the ATLAS detector}",
howpublished = "{HEPData (collection)}",
year = 2022,
note = "\url{https://doi.org/10.17182/hepdata.89413}"
}
The text was updated successfully, but these errors were encountered:
Question from @jackaraz:
The best implementation might be in terms of content negotiation as for the JSON-LD metadata format, i.e. BibTeX format could be returned for a record page with an HTTP header
Accept: application/x-bibtex
. This might require some refactoring of the HEPData code. Currently, the BibTeX format is written in cite-widget.html and is accessible only when a user clicks the "Cite" button in the top-right of a record page followed by selecting the "BibTeX" tab of the "Citing this record" widget.In the meantime, it is fairly easy to scrape the HTML of a record page to get the BibTeX format. For example, using the Python requests and beautifulsoup4 packages:
gives:
The text was updated successfully, but these errors were encountered: