X-Git-Url: http://git.kpe.io/?p=pubmed.git;a=blobdiff_plain;f=pubmed-src.lisp;h=18c83c4db9ec79fd9c6a2ddfb91e7fcd12a47222;hp=2977609864b24623c3407f8a5af7731c9d20be4b;hb=765f6d412238c7a9c977a778d37b1077e5099681;hpb=0256420d48883a141e63e4a6d445cef18d3bb6d7 diff --git a/pubmed-src.lisp b/pubmed-src.lisp index 2977609..18c83c4 100644 --- a/pubmed-src.lisp +++ b/pubmed-src.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Jun 2001 ;;;; -;;;; $Id: pubmed-src.lisp,v 1.2 2003/06/12 11:10:38 kevin Exp $ +;;;; $Id$ ;;;; ;;;; This file, part of cl-pubmed, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -22,6 +22,7 @@ (defparameter +pubmed-host+ "www.ncbi.nlm.nih.gov") (defparameter +pubmed-query-url+ "/entrez/utils/pmqty.fcgi") (defparameter +pubmed-fetch-url+ "/entrez/utils/pmfetch.fcgi") +(defparameter *proxy-host* nil) (define-condition pubmed-condition () @@ -108,10 +109,11 @@ &key (os *standard-output*) (format :text) (complete nil) (print-link nil)) "Display an article set to specified stream in specified format" - (dotimes (i (articles-count artset)) - (print-article (nth i (articles artset)) :os os :format format - :complete complete :print-link print-link)) - artset) + (dotimes (i (articles-count artset) artset) + (if (nth i (articles artset)) + (print-article (nth i (articles artset)) :os os :format format + :complete complete :print-link print-link) + (princ "NULL Article" os)))) (defmethod print-article ((art pm-article) &key (os *standard-output*) (format :text) (complete nil) (print-link nil)) @@ -221,7 +223,8 @@ XML string of PubMed search results and XML search status" (net.aserve.client:do-http-request (format nil "http://~a~a" +pubmed-host+ +pubmed-query-url+) :method :get - :query query-alist))) + :query query-alist + :proxy *proxy-host*))) (defun pubmed-fetch-pmids-xml (pmids) "Fetch articles for a list of PubMed ID's and return XML string" @@ -232,7 +235,8 @@ XML string of PubMed search results and XML search status" :method :get :query `(("db" . "PubMed") ("report" . "xml") ("mode" . "text") - ("id" . ,(list-to-delimited-string pmids #\,)))))) + ("id" . ,(list-to-delimited-string pmids #\,))) + :proxy *proxy-host*))) ;;; XML Extraction Routines