drpwchen/paper-fetch ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python tool that takes a DOI and saves the full paper as a PDF, using the most legitimate and cheapest path first. I want it to try open access sources first, then official publisher text mining access if I provide my own API keys, then my university library proxy with my own login, and if it still cannot download the file, just print my library resolver link so I can finish it myself.
Please make it publisher aware, because different journals behave differently, and be careful not to treat random HTML or paywall pages as PDFs. It should verify the file is a real PDF before saving. I also want simple config for things like my Unpaywall email, library endpoints, and local secrets for credentials, without storing passwords in plain text.
A command line flow like DOI in, PDF out is perfect, with clear success or failure output and useful JSON if possible. No shady bypasses or Sci Hub style fallbacks. If needed, look up current docs online while wiring up the official routes.
Have a live product UI? Try website reverse