From bmastenbrook at common-lisp.net Tue Jan 16 00:56:31 2007 From: bmastenbrook at common-lisp.net (bmastenbrook) Date: Mon, 15 Jan 2007 19:56:31 -0500 (EST) Subject: [Lisppaste-cvs] CVS lisppaste2 Message-ID: <20070116005631.6CC6730B0@common-lisp.net> Update of /project/lisppaste/cvsroot/lisppaste2 In directory clnet:/tmp/cvs-serv4784 Modified Files: lisppaste.asd package.lisp system-server.lisp variable.lisp web-server.lisp Log Message: Major change: use webutils and XML mixed mode. Add captchas. --- /project/lisppaste/cvsroot/lisppaste2/lisppaste.asd 2006/06/29 13:50:23 1.21 +++ /project/lisppaste/cvsroot/lisppaste2/lisppaste.asd 2007/01/16 00:56:30 1.22 @@ -1,5 +1,5 @@ ;;;; Silly emacs, this is -*- Lisp -*- -;;;; $Id: lisppaste.asd,v 1.21 2006/06/29 13:50:23 lisppaste Exp $ +;;;; $Id: lisppaste.asd,v 1.22 2007/01/16 00:56:30 bmastenbrook Exp $ ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/lisppaste.asd,v $ ;;;; See the LICENSE file for licensing information. @@ -22,19 +22,19 @@ pre-configured IRC channel about the paste and where it can be located." :depends-on (:araneida #-lisppaste-no-irc :cl-irc - :split-sequence :s-xml :s-xml-rpc :cl-ppcre) - :components ((:file "encode-for-pre") - (:file "package" :depends-on ("encode-for-pre")) + :split-sequence :s-xml :s-xml-rpc :cl-ppcre + :html-encode :webutils) + :components ((:file "package") (:file "variable" :depends-on ("package")) (:file "colorize-package") (:file "coloring-css" :depends-on ("colorize-package")) - (:file "colorize" :depends-on ("colorize-package" "coloring-css" "encode-for-pre")) + (:file "colorize" :depends-on ("colorize-package" "coloring-css")) (:file "abbrev") - (:file "clhs-lookup" :depends-on ("encode-for-pre" "abbrev")) - (:file "r5rs-lookup" :depends-on ("encode-for-pre")) - (:file "cocoa-lookup" :depends-on ("encode-for-pre")) - (:file "elisp-lookup" :depends-on ("encode-for-pre")) + (:file "clhs-lookup" :depends-on ("abbrev")) + (:file "r5rs-lookup") + (:file "cocoa-lookup") + (:file "elisp-lookup") #-lisppaste-no-irc (:file "irc-notification" :depends-on ("variable" "package")) (:file "lisppaste" :depends-on ("variable" "clhs-lookup" @@ -46,13 +46,12 @@ (:file "coloring-types" :depends-on ("colorize" "clhs-lookup")) (:file "web-server" - :depends-on ("encode-for-pre" "lisppaste" - "colorize-package" - "colorize" - "coloring-css")) + :depends-on ("lisppaste" + "colorize-package" + "colorize" + "coloring-css")) (:file "system-server" - :depends-on ("variable" "encode-for-pre" - "colorize-package" + :depends-on ("variable" "colorize-package" "coloring-css")) (:file "xml-paste" :depends-on ("variable" "lisppaste")) --- /project/lisppaste/cvsroot/lisppaste2/package.lisp 2004/11/07 21:01:43 1.10 +++ /project/lisppaste/cvsroot/lisppaste2/package.lisp 2007/01/16 00:56:30 1.11 @@ -1,4 +1,4 @@ -;;;; $Id: package.lisp,v 1.10 2004/11/07 21:01:43 bmastenbrook Exp $ +;;;; $Id: package.lisp,v 1.11 2007/01/16 00:56:30 bmastenbrook Exp $ ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/package.lisp,v $ ;;;; See the LICENSE file for licensing information. @@ -7,7 +7,7 @@ (eval-when (:execute :load-toplevel :compile-toplevel) (defpackage :lisppaste - (:use :cl #+sbcl :sb-bsd-sockets :html-encode) + (:use :cl #+sbcl :sb-bsd-sockets :html-encode :araneida :webutils) (:export :start-lisppaste :join-new-irc-channel :start-irc-notification :hup-irc-connection :quit-all-connections :hup-all-connections --- /project/lisppaste/cvsroot/lisppaste2/system-server.lisp 2004/07/15 12:37:35 1.1 +++ /project/lisppaste/cvsroot/lisppaste2/system-server.lisp 2007/01/16 00:56:30 1.2 @@ -14,25 +14,28 @@ (find-component-from-string (subseq string start-of-rest) :root new-root) new-root))))) -(defclass main-system-server-handler (araneida:handler) ()) +(defclass main-system-server-handler (handler) ()) -(defclass show-component-handler (araneida:handler) ()) +(defclass show-component-handler (handler) ()) -(defmethod araneida:handle-request-response ((handler main-system-server-handler) method request) - (araneida:request-send-headers request :expires 0) - (araneida:html-stream - (araneida:request-stream request) +(defmethod handle-request-response ((handler main-system-server-handler) method request) + (request-send-headers request :expires 0) + (xml-output-to-stream + (request-stream request) (lisppaste-wrap-page "Select a System" - `((div :class "controls") - (ul - ,@(loop for i in (all-system-names) - for system = (asdf:find-system i) - collect `(li ((a :href ,(araneida:urlstring (araneida:merge-url *show-component-url* - i))) - ,i) " - " ,(or (ignore-errors (asdf:system-description system)) - (ignore-errors (asdf:system-long-description system)) - "No Description")))))))) + (
+ (