Too long, didn't read
In thermodynamic modeling, it is desirable to have original references to experimental studies in order to properly interpret the results and prevent propagating mistakes. For many alloy systems, especially binaries, many of the original articles were written between (roughly) 1900 and 1950. Despite these being indispensable for modeling work, digital versions of the paper can be challenging to track down.
ILLiad is an InterLibrary Loan software service from OCLC offered by many institutions including Penn State, allows research articles (and book chapters) that are not accessible through the usual library resources. A typical ILLiad request page is below. The form serves its purpose well for requesting single papers, but is tedious for beginning literature searches for many articles that must be requested. Even for well formatted references, it is tedious to copy and paste seven or more fields in to request just one paper.
Getting our bearings
We need three pieces to be able to fill the above form (or any like it) automatically:
- A standard citation format that will easily fill the forms fields
- A place to fill our nicely formatted data
We'll stitch these together in a useful, portable bookmarklet, just like in my getting papers remotely post.
More than any citation format, BibTeX files are the digital common denominator. Any reference management software worth using should be able to read and export to BibTeX. The fact that it can be stored and used as plain text makes it a natural choice to use for any digital reference management.
For Mendeley users, that will mean finding your reference, right-clicking and selecting
BibTeX entry from the
Copy As menu.
See the reference software you use for instructions.
Another benefit of choosing an open format like BibTeX is that we should not have to worry about the syntax ourselves. I choose to use @mikolalysenko's parser and load it directly in the browser by using this accepted StackOverflow answer and rawgit. The loadScript function in the Gist is directly from that SO answer.
This parser will convert BibTeX entries into a JSON where each top-level key is the BibTeX citation key and the values are all the BibTeX fields, such as
We can assume that a user will only enter just one entry (and choose the last one if they enter more than one) just by using a simple loop through the keys and filling the form fields.
See the replaceValues function to see the looping in action.
Though before we do this, we need to know where to fill these values.
Finally, we need targets to fill our data.
All modern browsers have build in development tools.
Here we've used Chrome to drill down through the elements and find the relevant
You can see that the highlighted
textarea has the id
From the inspection tree on the right, it appears that the other fields follow a similar format, e.g.
getElementById function to grab each of these elements and let us change the values.
For brevity and lack of creativity, I've hardcoded these in the Gist as the replacementDict.
replacementDict simply maps the name of the element id to the name of the key in the BibTeX JSON.
If you don't use the same ILLiad system, you can inspect the page and you should only need to update the
Making it a bookmarklet
See it in action
And the resulting filled form:
Note that the reference you entered is nicely put in the
Notes section, in case your reference manager tries to pull the wool over your eyes when you import your ancient PDF.