summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-06-29 19:53:17 +0530
committerArun Isaac2022-06-29 19:53:17 +0530
commit2b35f99ea67c496501f25bedc0bc8c26ccd41efd (patch)
treea0655c8232fd9a6145f8bb6f33112a6d31b6972b
parent9d937b3b34726c24f98a0ed804e2c0c01a991ace (diff)
downloadgn-gemtext-2b35f99ea67c496501f25bedc0bc8c26ccd41efd.tar.gz
Remove static issue listings.
* closed.skb, index.skb, team.skb, topics.skb: Delete files. * tissue.scm (#:web-files): Remove static issue listings.
-rw-r--r--closed.skb24
-rw-r--r--index.skb68
-rw-r--r--team.skb48
-rw-r--r--tissue.scm39
-rw-r--r--topics.skb14
5 files changed, 15 insertions, 178 deletions
diff --git a/closed.skb b/closed.skb
deleted file mode 100644
index 8d28dfc..0000000
--- a/closed.skb
+++ /dev/null
@@ -1,24 +0,0 @@
-(use-modules (srfi srfi-1)
- (srfi srfi-19)
- (srfi srfi-28)
- (tissue issue)
- (tissue web))
-
-(define (numbered-issue-listing title-format issues)
- (section :title (format title-format (length issues))
- :number #f
- (issue-listing (reverse issues))))
-
-(document :title "GeneNetwork issue tracker"
- (ref :url "https://github.com/genenetwork/gn-gemtext-threads/new/main/issues"
- :text "Create new issue")
- " | "
- (ref :url "team.html" :text "Team agenda view")
- " | "
- (ref :url "topics.html" :text "Topics")
- " | "
- (ref :url "https://ci.genenetwork.org" :text "Continuous Integration")
- " | "
- (ref :url "/topics/links.html" :text "Links")
- (numbered-issue-listing "~a closed issues"
- (remove issue-open? (issues))))
diff --git a/index.skb b/index.skb
deleted file mode 100644
index 0651cab..0000000
--- a/index.skb
+++ /dev/null
@@ -1,68 +0,0 @@
-(use-modules (srfi srfi-1)
- (srfi srfi-19)
- (srfi srfi-28)
- (tissue issue)
- (tissue web))
-
-(define %forgotten-threshold
- ;; 90 days
- 90)
-
-(define (forgotten-issue? issue)
- "Return #t if ISSUE is forgotten. Else, return #f. An issue is
-considered forgotten if there has been no activity for longer than
-%forgotten-threshold days."
- (time<? (date->time-monotonic (issue-last-updated-date issue))
- (subtract-duration (date->time-monotonic (current-date))
- (make-time time-duration 0
- (* %forgotten-threshold 24 60 60)))))
-
-(define (unanswered-issue? issue)
- "Return #t if ISSUE is unanswered. Else, return #f. An issue is
-considered unanswered if none but the creator of the issue has posted
-to it."
- (= (length (delete-duplicates
- (map post-author
- (issue-posts issue))))
- 1))
-
-(define (numbered-issue-listing title-format issues)
- (section :title (format title-format (length issues))
- :number #f
- (issue-listing (reverse issues))))
-
-(document :title "GeneNetwork issue tracker"
- (ref :url "https://github.com/genenetwork/gn-gemtext-threads/new/main/issues"
- :text "Create new issue")
- " | "
- (ref :url "team.html" :text "Team agenda view")
- " | "
- (ref :url "topics.html" :text "Topics")
- " | "
- (ref :url "https://ci.genenetwork.org" :text "Continuous Integration")
- " | "
- (ref :url "/topics/links.html" :text "Links")
- (numbered-issue-listing "~a unanswered issues"
- (filter (lambda (issue)
- (and (issue-open? issue)
- (unanswered-issue? issue)))
- (issues)))
- (numbered-issue-listing "~a forgotten issues"
- (filter (lambda (issue)
- (and (issue-open? issue)
- (forgotten-issue? issue)))
- (issues)))
- (numbered-issue-listing "~a active issues"
- (filter (lambda (issue)
- (and (issue-open? issue)
- (not (forgotten-issue? issue))
- (not (unanswered-issue? issue))))
- (issues)))
- (ref :url "/closed.html"
- :text (format "~a closed issues"
- (fold (lambda (issue result)
- (if (issue-open? issue)
- result
- (1+ result)))
- 0
- (issues)))))
diff --git a/team.skb b/team.skb
deleted file mode 100644
index c4efb85..0000000
--- a/team.skb
+++ /dev/null
@@ -1,48 +0,0 @@
-(use-modules (srfi srfi-26)
- (ice-9 match)
- (tissue issue))
-
-(define (issue-awaiting-response? person issue)
- "Return #t if ISSUE is awaiting a response from PERSON. Else, return
-#f. An issue is considered to be awaiting a response from a person if
-
-1. That person has participated in the issue and there are newer posts
-to that issue.
-2. The issue is assigned to that person but they have not
-participated."
- (let ((authors (map post-author
- (issue-posts issue))))
- (or (and (member person authors)
- (not (string=? person (last authors))))
- (and (member person (issue-assigned issue))
- (not (member person authors))))))
-
-(define (numbered-issue-listing title-format issues)
- (subsection :title (format title-format (length issues))
- :number #f
- (issue-listing (reverse issues))))
-
-(define (person-section person)
- (section :title person
- :ident (string-map (lambda (c)
- (case c
- ((#\space) #\-)
- (else c)))
- (string-downcase person))
- :number #f
- (numbered-issue-listing "~a issues await your response"
- (reverse (filter (lambda (issue)
- (and (issue-open? issue)
- (issue-awaiting-response? person issue)))
- (issues))))
- (numbered-issue-listing "you have been assigned ~a issues"
- (reverse (filter (lambda (issue)
- (and (issue-open? issue)
- (member person (issue-assigned issue))))
- (issues))))))
-
-(document :title "GeneNetwork team agenda view"
- (toc)
- (map (lambda (author)
- (person-section author))
- (authors)))
diff --git a/tissue.scm b/tissue.scm
index b6db45e..65df566 100644
--- a/tissue.scm
+++ b/tissue.scm
@@ -43,27 +43,18 @@
#:web-css "/style.css"
#:web-files (cons* (file "style.css"
(copier "style.css"))
- (file "index.html"
- (skribe-exporter "index.skb"))
- (file "closed.html"
- (skribe-exporter "closed.skb"))
- (file "team.html"
- (skribe-exporter "team.skb"))
- (file "topics.html"
- (skribe-exporter "topics.skb"))
- (append (tag-pages)
- (filter-map (lambda (filename)
- (cond
- ((and (string-suffix? ".gmi" filename)
- (not (string=? (basename filename)
- "README.gmi")))
- (file (replace-extension filename "html")
- (gemtext-exporter filename
- (genenetwork-gemtext-reader filename))))
- ((or (string-suffix? ".jpg" filename)
- (string-suffix? ".png" filename)
- (string-suffix? ".svg" filename))
- (file filename
- (copier filename)))
- (else #f)))
- (git-tracked-files)))))
+ (filter-map (lambda (filename)
+ (cond
+ ((and (string-suffix? ".gmi" filename)
+ (not (string=? (basename filename)
+ "README.gmi")))
+ (file (replace-extension filename "html")
+ (gemtext-exporter filename
+ (genenetwork-gemtext-reader filename))))
+ ((or (string-suffix? ".jpg" filename)
+ (string-suffix? ".png" filename)
+ (string-suffix? ".svg" filename))
+ (file filename
+ (copier filename)))
+ (else #f)))
+ (git-tracked-files))))
diff --git a/topics.skb b/topics.skb
deleted file mode 100644
index cd3c053..0000000
--- a/topics.skb
+++ /dev/null
@@ -1,14 +0,0 @@
-(use-modules (rnrs hashtables)
- (tissue tissue))
-
-;; Steal file-details from (tissue issue) until there is a public
-;; interface for it.
-(define file-details
- (@@ (tissue issue) file-details))
-
-(document :title "Topics"
- (itemize (filter-map (lambda (file)
- (let ((file-details (file-details file)))
- (item (ref :url (replace-extension file "html")
- :text (hashtable-ref file-details 'title file)))))
- (gemtext-files-in-directory "topics"))))