Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with CSL export #89

Closed
rjfarmer opened this issue Aug 20, 2022 · 2 comments
Closed

Issues with CSL export #89

rjfarmer opened this issue Aug 20, 2022 · 2 comments

Comments

@rjfarmer
Copy link

I'm trying to implement the CSL export option ( /export/csl) and are running into a few issues:

First the documentation (https://ui.adsabs.harvard.edu/help/api/api-docs.html#post-/export/csl) says you want "bibcodes" when its actually "bibcode" singular:

data = {
 "bibcodes": '2021ApJ...923..214F',
 "style": "aastex",
 "format": 1,
 "journalformat": 1,
  "sort": "first_author desc",
  }

Which gets the following response:

response={'error': 'no bibcode found in payload (parameter name is `bibcode`)'}

Even so, passing 'bibcode':

data = {
 "bibcode": '2021ApJ...923..214F',
 "style": "aastex",
 "format": 1,
 "journalformat": 1,
  "sort": "first_author desc",
  }

Gets a:

response={'error': 'no result from solr'}, status=404

On a whim I tried newline separating the bibcode (like a bigquery) and that gets somewhere:

data = {
 "bibcode": '2021ApJ...923..214F\n',
 "style": "aastex",
 "format": 1,
 "journalformat": 1,
  "sort": "first_author desc",
  }

But that returns a seemingly random result (though the same result independent of the bibcode I use)

response={'msg': 'Retrieved 1 abstracts, starting with number 1.', 'export': '\\bibitem[Khanna(2021)]{2021pte1.book.....K} Khanna, V. K.\\ 2021, Practical Terahertz Electronics: Devices and Applications, Volume 1, by Khanna, Vinod Kumar. ISBN: 978-0-7503-3169-2. IOP ebooks. Bristol, UK: IOP Publishing, 2021. doi:DOI:\n'}, status=200
@rjfarmer
Copy link
Author

Okay i see the problem in the end, even though the you want a 'bibcode' singular you actually want a list of bibcodes. Could the documentation be made clearer? (or convert the api to use bibcodes (plural). export/custom has this as well (asking for bibcodes but it wants bibcode)

@donnat
Copy link

donnat commented Sep 1, 2022 via email

@rjfarmer rjfarmer closed this as completed Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants