Autocompleting entries using an external script

A few months ago I made a python program to autocomplete bibtex entries by performing only queries to crossref, arxiv, dblp and researchr. It essentially reads whatever data is provided and uses these websites’ API to search for any matching entries and adds the data of any it finds with a little logic to limit false-positives and invalid field values (eg, URL that return 404…). Its not perfect but I found it fairly accurate and useful, it can often find a full complete entry from just a title.

The script is available on github under a MIT license and can be installed from PyPI with pip. When I posted about it on reddit someone mentionned it might be interesting to add to JabRef.

I’ve seen JabRef also has some entry auto-completion based on DOIs/ISBN or eprint or arxiv ID’s and maybe other features I’m not aware of, but these seem less powerful then my script which can run on any entry as long as it has a title. On the other hand JabRef has a pretty GUI and merge editor whereas my script is just a CLI.

I’m thinking it should be possible to have JabRef options to call my script on one/a selection/all entries in a file, and then present the results in the merge editor. As it stands I can already run the script on the JabRef file with JabRef open, which leads JabRef to prompt me to review changes, so this feature would simply avoid having alt-tab to a terminal and typing a prompt when editing files, but I think it could be worth it, especially when only completing a few entries as click selection is easier than manually typing entry ID’s in a terminal.

If you find this an interesting proposal I can probably try to help implement it if any modification of my program are needed to make I/O simpler. I could also try to help on the JabRef side but I don’t know Java so I might not have much to offer there…

2 Likes

Thank you very much for your cool program and your interest in contributing to JabRef!

From what I saw, the functionality of your program is very similar to the “Update with bibliographic information from the web” and some other related features, e.g search for a DOI.
For the first step, this seems very similar, JabRef will take the existing BibEntry and use some fields to search for information e.g. based on author or title (EntryBasedFetcher and EntryBasedParserFetcher).

To summarize, JabRef and your tool already have overlapping features. Nonetheless, it seems like your implementation for author/title search could be helpful to add this to our existing fetchers to improve getting data. And I think we should expand the Update with bibliographic information to check multiple fetchers.
And your implementation of the Researchr would be a good starting point for adding this as well to JabRef.

If you want to take a look at how JabRef implements this:
Fetchers - Developer Documentation
It looks a bit complex at first, but the different interfaces represent different fetcher capabilities.

The update with bibliographic information:

Regards from Germany
Christoph

Oh I Hadn’t found this feature, you’re right it looks to be mostly the same. I’ll try to look at the documentation you linked

1 Like

You’re welcome! If you have any ideas for improvement or further collaboration feel free to ask!