https://github.com/mstimberg/pubmed_pdf
Replace pubmed links in bibtex file with links to PubMedCentral PDFs (if existing)
https://github.com/mstimberg/pubmed_pdf
bibtex pdf pubmed
Last synced: about 2 months ago
JSON representation
Replace pubmed links in bibtex file with links to PubMedCentral PDFs (if existing)
- Host: GitHub
- URL: https://github.com/mstimberg/pubmed_pdf
- Owner: mstimberg
- License: bsd-3-clause
- Created: 2017-02-02T17:09:59.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-16T13:33:42.000Z (over 8 years ago)
- Last Synced: 2025-02-05T05:45:32.121Z (9 months ago)
- Topics: bibtex, pdf, pubmed
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
This is a little tool to find freely available, open-access PDFs for articles
in a Bibtex file, and to alter the Bibtex file so that it points to these PDF
files.
The tool is quite specific to the use-case I had, but the included functions
might be useful in other contexts.
It requires an installation of `requests`
(https://github.com/kennethreitz/requests/) and `bibtexparser`
(https://github.com/sciunto-org/python-bibtexparser)
Here's what it does when executed as a script (change `SOURCE_FILENAME` and
`TARGET_FILENAME` in the source code directly to adapt to your system):
1. Go through the Bibtex file and check for each entry whether it has an URL
with a Pubmed link (`http://www.ncbi.nlm.nih.gov/pubmed/...`)
2. Check whether [PubMedCentral](https://www.ncbi.nlm.nih.gov/pmc/) has a PDF
for this article (following up redirections if necessary)
3. If yes, replace the URL in the Bibtex file with the URL to the PDF; if no,
delete the URL (if we have a link to the article via the DOI field)
Please note that I am not particularly interested in extending this into a
fully-featured package that does a lot more than that. This was mostly a
one-use script that I am sharing just in case it is useful to anyone.