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
This is a problem when I use these for candidates in emacs, since you can't search text that isn't there.
Right now the citation comes as
#+BEGIN_SRC jupyter-python
import requests
r = requests.get('https://api.citeas.org/product/http://api.citeas.org/product/https://doi.org/10.1021/[email protected]')
d = r.json()
d['citations'][0]['citation']
#+END_SRC
#+RESULTS:
: Abed, J., Heras-Domingo, J., Sanspeur, R. Y., Luo, M., Alnoush, W., Meira, D. M., … Sargent, E. H. (2024, June 3). Pourbaix Machine Learning Framework Identifies Acidic Water Oxidation Catalysts Exhibiting Suppressed Ruthenium Dissolution. <i>Journal of the American Chemical Society</i>. American Chemical Society (ACS). http://doi.org/10.1021/jacs.4c01353
The only solution I see is not using the citation from citeas.org. It looks like I could use the metadata instead to build up a citation. A lightly tested solution is
#+BEGIN_SRC jupyter-python
md = d['metadata']
cite_data = dict(authors = ', '.join(f'{author["given"]} {author["family"]}'
for author in md['author']),
title = md.get('title', None),
journal = md.get("container-title", None),
volume = md.get('volume', None),
issue = md.get('issue', None),
page = md.get('page', None),
year = md.get('year', None),
url = md.get('URL', None))
citation = ''
if cite_data['title']:
citation += '{title}, '
if cite_data['authors']:
citation += '{authors}, '
if cite_data['journal']:
citation += '{journal} '
if cite_data['volume'] and cite_data['issue']:
citation += '{volume}({issue}) '
elif cite_data['volume']:
citation += '{volume} '
if cite_data['page']:
citation += '{page} '
if cite_data['year']:
citation += '({year}).'
if cite_data['url']:
citation += ' {url}'
citation.format(**cite_data)
#+END_SRC
#+RESULTS:
: Pourbaix Machine Learning Framework Identifies Acidic Water Oxidation Catalysts Exhibiting Suppressed Ruthenium Dissolution, Jehad Abed, Javier Heras-Domingo, Rohan Yuri Sanspeur, Mingchuan Luo, Wajdi Alnoush, Debora Motta Meira, Hsiaotsu Wang, Jian Wang, Jigang Zhou, Daojin Zhou, Khalid Fatih, John R. Kitchin, Drew Higgins, Zachary W. Ulissi, Edward H. Sargent, Journal of the American Chemical Society 146(23) 15740-15750 (2024). https://doi.org/10.1021/jacs.4c01353
The text was updated successfully, but these errors were encountered:
This is a problem when I use these for candidates in emacs, since you can't search text that isn't there.
Right now the citation comes as
The only solution I see is not using the citation from citeas.org. It looks like I could use the metadata instead to build up a citation. A lightly tested solution is
The text was updated successfully, but these errors were encountered: