pybliometrics-dev / pybliometrics

Python-based API-Wrapper to access Scopus
https://pybliometrics.readthedocs.io/en/stable/
Other
414 stars 129 forks source link

Add proper export (to bibtex) #295

Open claell opened 1 year ago

claell commented 1 year ago

pybliometrics version: 3.5.2

Affected classes: AbstractRetrieval

Expected behavior: My use case for this project is to ideally automate workflows that I have to otherwise use the Scopus web UI for. For a literature review, I want to search Scopus and export the results (ideally to bibtex). This is possible through the web UI. Unfortunately, it doesn't seem fully supported with this package (https://pybliometrics.readthedocs.io/en/stable/classes/AbstractRetrieval.html#pybliometrics.scopus.AbstractRetrieval.get_bibtex is limited to Journal articles right now). Is this due to API limitations?

I saw this implemented in another project, but maybe they just used their own code to achieve the behavior: https://github.com/muschellij2/rscopus/issues/20.

Michael-E-Rose commented 1 year ago

The bibtex (and other export options) are among the oldest parts of code of pybliometrics - when it was called scopus and maintained only by @jkitchin. Do you remember why just for journal articles? I think it's not restricted by the API, is it?

For all of these export options it'd be great to use another library and provides easy conversion between all the types. Currently everything is hard-coded.

claell commented 1 year ago

Alright. I started working on a function that improves the current situation (but that is only for BibTeX export).

Maybe we can discuss that.

I think the restriction to Journal articles might just have been a decision to make implementation easy.

Michael-E-Rose commented 1 year ago

You're probably right!

A PR to address this issue will be most welcome!

claell commented 1 year ago

Alright. I'll continue to work on it for my own usage and hopefully can contribute with a PR, soon. Some help with internals is very welcomed!

claell commented 11 months ago

Just some update: The issue is not forgotten. As per our call, I also use an external library for the bibtex handling now, which might help a little with performance and possibly robustness (although also introduced quite some problems to tackle). Currently, I based it on the ScopusSearch class (as opposed to the AbstractRetrieval class before) for better performance.