Since 2008 I've been using a script ([[entrez.py]]) to search [PubMed][] from the command line. Yesterday I decided it was time to clean up the script and make it publicly available. It turned out to be reasonably complicated, so I just reimplemented the guts using the Python [SOAP][] library [Suds][] working with the [Entrez SOAP interface][eSOAP]. I haven't been able to find the original that I started with, but it seems to be related to `Pyblio/Query.py` in early versions of [pybliographer][]. $ ./entrez.py -L # available databases: pubmed protein nuccore ... $ ./entrez.py -X database: pubmed description: PubMed bibliographic record available fields: ALL All Fields All terms from all searchable fields UID UID Unique number assigned to publication FILT Filter Limits the records TITL Title Words in title of publication ... $ ./entrez.py -X -F AUTH field AUTH in pubmed: Description Author(s) of publication FullName Author Hierarchy N IsDate N IsHidden N IsNumerical N Name AUTH SingleToken Y TermCount 11526565 $ ./entrez.py -v 'king[au]+yang[au]+2010[dp]+monte[tit]' entrezpy: INFO run eEsearch on pubmed entrezpy: INFO search returned 1 of 1 items entrezpy: INFO run eFetch on pubmed entrezpy: INFO convert medline XML to BibTeX @Article{King2010, author = "William T. King and Meihong Su and Guoliang Yang", title = "Monte Carlo simulation of mechanical unfolding of proteins based on a simple two-state model.", journal = "International journal of biological macromolecules", ... doi = "10.1016/j.ijbiomac.2009.12.001", URL = "http://www.ncbi.nlm.nih.gov/pubmed/20004685", language = "eng", } The [[BibTeX]] conversion uses [bibutils][] and [bibclean][] for the medline-to-BibTeX conversion. [PubMed]: http://www.ncbi.nlm.nih.gov/pubmed/ [SOAP]: http://en.wikipedia.org/wiki/SOAP [Suds]: https://fedorahosted.org/suds/ [eSOAP]: http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/DOC/esoap_help.html [pybliographer]: http://pybliographer.org/ [bibutils]: http://www.scripps.edu/~cdputnam/software/bibutils [bibclean]: http://ftp.math.utah.edu/pub/bibclean/ [[!tag tags/programming]] [[!tag tags/python]]