5 Cent tip for today [ Seti statistics ]

Started by newdep, July 17, 2004, 04:50:51 AM

Previous topic - Next topic

newdep

;;

;; SETI statistic lister v 1.0

;; Fillin your Seti email-address in 'seti

;;

;; Works with Newlisp 8009 and up ! (trim function)

;;

;; Norman

;;



(set 'seti "http://setiathome2.ssl.berkeley.edu/fcgi-bin/fcgi?cmd=user_xml&email=seti@somewhere.mars">http://setiathome2.ssl.berkeley.edu/fcg ... where.mars">http://setiathome2.ssl.berkeley.edu/fcgi-bin/fcgi?cmd=user_xml&email=seti@somewhere.mars" )

(set 'elements '(  

"userinfo" "name" "numresults"

"cputime" "avecpu" "resultsperday"

"lastresulttime" "regdate" "usertime" ))



(define (banner) (println (dotimes ( x 50 ) (print "*"))  ))



(xml-type-tags nil 'cdata '!-- nil)

(set 'setiurl (xml-parse (get-url seti) (+ 1 2 8 16) ))



(set 'setidata (nth 1 (nth 1 setiurl)))



;;

;; Finding and printing Seti XML Elements

;;



(banner)

(dolist (x elements)

        (if (set 'element (lookup (symbol x) setidata))

        (println "** SETI " x " -> " (trim element " " ""))))

(banner)

(exit)



;; enjoy...
-- (define? (Cornflakes))