Add instances and onion table

This commit is contained in:
Cadence Ember 2023-09-10 22:27:42 +12:00
parent caabba5a8c
commit a4924efbf8
2 changed files with 21 additions and 7 deletions

View File

@ -27,14 +27,26 @@
@subsection{Mirrors}
@(define (mirrors-file-table onion?)
(for/list ([item (with-input-from-file "files/instances.json" (lambda () (read-json)))]
#:when (eq? onion? (regexp-match? #rx"\\.onion" (hash-ref item 'instance))))
(define-values (owner-name owner-website instance)
(apply values (for/list ([key '(owner_name owner_website instance)])
(hash-ref item key))))
(list (if (string? owner-website) (hyperlink owner-website owner-name) owner-name)
(if onion? (hyperlink instance "Visit onion site") (url instance)))))
@tabular[#:style (style "user-table instance-list user-table--title" null)
`((,(literal "Hoster") ,(literal "Link"))
,@(for/list ([item (with-input-from-file "files/instances.json" (lambda () (read-json)))])
(define-values (owner-name owner-website instance)
(apply values (for/list ([key '(owner_name owner_website instance)])
(hash-ref item key))))
(list (if (string? owner-website) (hyperlink owner-website owner-name) owner-name)
(url instance))))]
,@(mirrors-file-table #f))]
@subsection{Onion Mirrors}
Please note: You need the @hyperlink["https://www.torproject.org/" "Tor browser"] to see these.
@tabular[#:style (style "user-table instance-list user-table--title" null)
`((,(literal "Hoster") ,(literal "Link"))
,@(mirrors-file-table #t))]
@hyperlink["https://docs.breezewiki.com/files/instances.json" "Machine-readable data"]

View File

@ -9,5 +9,7 @@
{"owner_name": "Whatever Social", "owner_website": "https://whatever.social", "instance": "https://nerd.whatever.social"},
{"owner_name": "Frontend Friendly", "owner_website": "https://frontendfriendly.xyz", "instance": "https://breezewiki.frontendfriendly.xyz"},
{"owner_name": "nohoster", "owner_website": "mailto:admin@nohost.network", "instance": "https://breeze.nohost.network"},
{"owner_name": "WhateverItWorks", "owner_website": "https://www.whateveritworks.org", "instance": "https://breeze.whateveritworks.org"}
{"owner_name": "WhateverItWorks", "owner_website": "https://www.whateveritworks.org", "instance": "https://breeze.whateveritworks.org"},
{"owner_name": "Opnxng", "owner_website": "https://about.opnxng.com", "instance": "https://z.opnxng.com"},
{"owner_name": "lost+skunk", "owner_website": "https://matrix.to/#/@softpigeones:sibnsk.net", "instance": "http://bw.skunky7dhv7nohsoalpwe3sxfz3fbkad7r3wk632riye25vqm3meqead.onion"}
]