kermitt2 / grobid_client_python

Python client for GROBID Web services
Apache License 2.0
275 stars 74 forks source link

Allow to request bibtex from ProcessReferences #53

Open LukasWallrich opened 1 year ago

LukasWallrich commented 1 year ago

Thanks for this very helpful client!

I would love the ability to request bibtex from ProcessReferences - for that, grobid needs application/x-bibtex but I don't believe there is a way to pass that at present? Or am I overlooking something?

kermitt2 commented 1 year ago

Hi @LukasWallrich !

This is indeed not supported by the client out of the box, no parameter for this for the moment.

But to get bibtex results when using the processReferences or processCitationList service, you can edit the file grobid_client/client.py, line 19:

    accept_type = "application/xml"

to

   accept_type = "application/x-bibtex"

After edit, you need to reinstall:

> python3 setup.py install