DATARAMA

Get rid of goon frontpage output

April 26, 2016
Project: plutonium

Since I no longer need goon release info on the frontpage, it's now been removed.

1 files changed, 4 insertions / 30 deletions

diff --git a/plutonium.scm b/plutonium.scm
index 399972e..f3ed280 100755
--- a/plutonium.scm
+++ b/plutonium.scm
@@ -23,8 +23,7 @@
 (define date-format/html "~B ~e, ~Y")
 (define date-format/front "~b ~d ~Y")
 (define template-path "template/page.scm")
-(define goon-feed "goon-releases.list")
-(define front-feed-size 8)
+(define front-feed-size 4)
 (define extension "pu")
 (define default-lang "en")
 (define max-rating 5)
@@ -172,8 +171,7 @@
     txt
     ""))
 
-(define rx/recent
-  (irregex '(: "%RECENT")))
+(define rx/recent (irregex '(: "%RECENT")))
 
 ; == Front page activity ====
 (define (render-fp-activity-entry entry)
@@ -187,31 +185,14 @@
     (date->string (archive-entry-date entry) date-format/front)
     "</span></a></li>"))
 
-(define (render-goon-entry entry)
-  (string-append
-    "<li><a href=\"projects/"
-    (cdddr entry)
-    "\">"
-    "Release: "
-    (car entry)
-    "<span class=\"date\">"
-    (date->string (archive-entry-date entry) date-format/front)
-    "</span></a></li>"))
-
 (define (render-fp-activity feed)
   (string-append
     "<ul class=\"fp_feed\">"
-    (apply string-append 
-           (map 
-             (lambda (x) 
-               (if (and (pair? (cddr x)) (string=? (caddr x) "goon"))
-                 (render-goon-entry x)
-                 (render-fp-activity-entry x)))
-             feed))
+    (apply string-append (map render-fp-activity-entry feed))
     "</ul>"))
 
 (define (vw-insert-recent txt)
-  (let ((feed (combine-feeds)))
+  (let ((feed (generate-feed)))
     (irregex-replace/all
       rx/recent
       txt
@@ -298,13 +279,6 @@
 (define (archive-entry-date entry) (cadr entry))
 (define (archive-entry-title entry) (cddr entry))
 
-(define (combine-feeds)
-  (sort (append (read-goonfeed) (generate-feed))
-        (lambda (x y) (date>? (archive-entry-date x) (archive-entry-date y)))))
-
-(define (read-goonfeed)
-  (car (read-file goon-feed)))
-
 (define (generate-feed)
   (sort (map (lambda (x) (archive-entry (filepath:take-base-name x)
                                         (page-title x)
 
Powered by Plutonium