It would be cool to associate individual figures with each paper, and provide thumbnails that can be followed to the full-size images.
I solved a good chunk of this problem for a related project, but the solution only works for articles in EuropePMC: open_access_figures.
The getfigures script there runs getpapers with a user-specified query to download the XML and figure images (where available) for all papers matching the query in EuropPMC. It then parses the XML to identify the figures and extract the captions, and it also generates URLs linking to the thumbnails on EuropePMC (which are predictable once you have the full image filenames).
So, I think the initial goal should be to generate the following:
a dataset containing all the figures from EuropePMC
another with the thumbnails for those figures
metadata for each article - an array of figures with:
caption
thumbnail (url / checksum)
full figure image (url / checksum)
Here's how to achieve that:
the captions can be generated using the EuropePMC fulltext dumps here:
the full figures can be pulled using getpapers (or the EuropePMC api directly)
the thumbnails can be scraped once the full images are pulled, the same way as in the getfigures script linked above.
Help and ideas very welcome. I'm happy to do this myself, but won't get to it for at least a few days, possibly longer.
It would be cool to associate individual figures with each paper, and provide thumbnails that can be followed to the full-size images.
I solved a good chunk of this problem for a related project, but the solution only works for articles in EuropePMC: open_access_figures.
The
getfigures
script there runs getpapers with a user-specified query to download the XML and figure images (where available) for all papers matching the query in EuropPMC. It then parses the XML to identify the figures and extract the captions, and it also generates URLs linking to the thumbnails on EuropePMC (which are predictable once you have the full image filenames).So, I think the initial goal should be to generate the following:
Here's how to achieve that:
getfigures
script linked above.Help and ideas very welcome. I'm happy to do this myself, but won't get to it for at least a few days, possibly longer.