git.fiddlerwoaroof.com
Browse code

update clim app a bit.

fiddlerwoaroof authored on 05/04/2017 07:08:02
Showing 1 changed files
... ...
@@ -54,7 +54,7 @@
54 54
           (format pane "~a <~a>~%"
55 55
                   (alimenta::title item)
56 56
                   (alimenta::link item)))))
57
-    (let ((text (alimenta::content item)))
57
+    (let ((text (plump:text (plump:parse (alimenta::content item)))))
58 58
       (format pane "~&~{~{~a~^ ~}~^~%~}~2&"
59 59
               (remove-if #'null
60 60
                          (mapcar #'tokens
... ...
@@ -72,6 +72,13 @@
72 72
   `(let ((,interactor-symbol (clim:find-pane-named clim:*application-frame* 'int)))
73 73
      ,@body))
74 74
 
75
+(define-alimenta-command (open-feed :name t) ((url string))
76
+  (let ((int (clim:find-pane-named clim:*application-frame* 'int))
77
+        (app (clim:find-pane-named clim:*application-frame* 'app)))
78
+    (setf *articles* (alimenta.pull-feed:pull-feed url :detect t))
79
+    (format int "~&Switching to the feed view~%")
80
+    (setf (clim:stream-default-view app) *feed-view*)))
81
+
75 82
 (define-alimenta-command (to-feed :name t) ()
76 83
   (let ((int (clim:find-pane-named clim:*application-frame* 'int))
77 84
         (app (clim:find-pane-named clim:*application-frame* 'app)))
... ...
@@ -94,5 +101,7 @@
94 101
             ('default  'flopped)
95 102
             (t 'default)))))
96 103
 
104
+#|
97 105
 (clim:run-frame-top-level
98 106
   (clim:make-application-frame 'alimenta-clim::alimenta))
107
+|#