From 7f5c57d7de7ebddd17ffa250fcce1bf399ac7a4b Mon Sep 17 00:00:00 2001
From: dozens
Date: Mon, 30 Oct 2023 13:59:37 -0600
Subject: [PATCH 1/5] =?UTF-8?q?=E2=9C=A8=20webring?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
webring/db/members.rec | 20 +++++++
webring/index.html | 107 +++++++++++++++++++++++++++++++++++++
webring/justfile | 38 ++++++++++++++
webring/src/example.html | 111 +++++++++++++++++++++++++++++++++++++++
webring/src/example.opml | 16 ++++++
webring/webring.opml | 13 +++++
6 files changed, 305 insertions(+)
create mode 100644 webring/db/members.rec
create mode 100644 webring/index.html
create mode 100644 webring/justfile
create mode 100644 webring/src/example.html
create mode 100644 webring/src/example.opml
create mode 100644 webring/webring.opml
diff --git a/webring/db/members.rec b/webring/db/members.rec
new file mode 100644
index 0000000..3210b51
--- /dev/null
+++ b/webring/db/members.rec
@@ -0,0 +1,20 @@
+%rec: member
+%doc: a member of the webring
+%key: id
+%unique: id name url feed
+%auto: id created
+%type: id int
+%type: created date
+%type: title,url,feed line
+%typedef: Name_t regexp /[a-z]{3,13}/
+%type: name Name_t
+%allowed: id created title name url feed
+%mandatory: id title name url
+%sort: id
+
+id: 0
+created: Mon, 30 Oct 2023 13:38:40 -0600
+name: dozens
+title: dozens
+url: https://tilde.town/~dozens
+feed:
diff --git a/webring/index.html b/webring/index.html
new file mode 100644
index 0000000..3f39567
--- /dev/null
+++ b/webring/index.html
@@ -0,0 +1,107 @@
+
+
+
+
+
+ webring
+
+
+
+
+ the benevolent tildepals basement heroes 43beans commonheath of casakhstan webring
+
+
+
+
+
+ snippet
+
+ code snippet to add to member site
+
+ all you have to do
+ (after you've been added to the db)
+ is add a few anchor tags to your site.
+ you can do something like this,
+ replacing "yoursitename"
+ with the value of "name"
+ you provide in members.rec
+
+
+<div>
+<p>this site is a member of a very powerful webring!</p>
+<p>
+ < <a href="https://friends.m455.casa/webring/index.html?name=yoursitename&dir=prev">previous</a> |
+ <a href="https://friends.m455.casa/webring/index.html">all</a> |
+ <a href="https://friends.m455.casa/webring/index.html?name=yoursitename&dir=next">next</a> >
+</p>
+</div>
+
+
+ that would end up looking something like this:
+
+
+
+
+
this site is a member of a very powerful webring!
+
+ < previous |
+ all |
+ next >
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/webring/justfile b/webring/justfile
new file mode 100644
index 0000000..0a3c3be
--- /dev/null
+++ b/webring/justfile
@@ -0,0 +1,38 @@
+# list all recipes
+default:
+ just --list --unsorted
+
+# add a new webring member
+new:
+ #!/usr/bin/env sh
+ read -p "name (lowercase, 3-13 characters): " name
+ read -p "title: " title
+ read -p "url: " url
+ read -p "feed: " feed
+ recins --verbose -t member \
+ -f "name" -v "$name" \
+ -f "title" -v "$title" \
+ -f "url" -v "$url" \
+ -f "feed" -v "$feed" \
+ db/members.rec
+alias add := new
+
+# build html
+html:
+ recsel db/members.rec \
+ | rec2csv \
+ | csvjson \
+ | jq '. | {data: .}' \
+ | mustache - src/example.html index.html
+
+# build opml
+opml:
+ recsel db/members.rec \
+ | rec2csv \
+ | csvjson \
+ | jq '. | {data: .}' \
+ | jq '{ data: [ .data[] | select(.feed != null) ] }' \
+ | mustache - src/example.opml webring.opml
+
+# compile html and opml
+build: html opml
diff --git a/webring/src/example.html b/webring/src/example.html
new file mode 100644
index 0000000..0bbaa4c
--- /dev/null
+++ b/webring/src/example.html
@@ -0,0 +1,111 @@
+
+
+
+
+
+ webring
+
+
+
+
+ the benevolent tildepals basement heroes 43beans commonheath of casakhstan webring
+
+
+
+
+
+ snippet
+
+ code snippet to add to member site
+
+ all you have to do
+ (after you've been added to the db)
+ is add a few anchor tags to your site.
+ you can do something like this,
+ replacing "yoursitename"
+ with the value of "name"
+ you provide in members.rec
+
+
+<div>
+<p>this site is a member of a very powerful webring!</p>
+<p>
+ < <a href="https://friends.m455.casa/webring/index.html?name=yoursitename&dir=prev">previous</a> |
+ <a href="https://friends.m455.casa/webring/index.html">all</a> |
+ <a href="https://friends.m455.casa/webring/index.html?name=yoursitename&dir=next">next</a> >
+</p>
+</div>
+
+
+ that would end up looking something like this:
+
+
+
+
+
this site is a member of a very powerful webring!
+
+ < previous |
+ all |
+ next >
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/webring/src/example.opml b/webring/src/example.opml
new file mode 100644
index 0000000..24b0917
--- /dev/null
+++ b/webring/src/example.opml
@@ -0,0 +1,16 @@
+
+
+
+ tildepals webring
+ tildepals webring
+ dozens
+ dozens@tilde.team
+
+
+
+ {{#data}}
+
+ {{/data}}
+
+
+
diff --git a/webring/webring.opml b/webring/webring.opml
new file mode 100644
index 0000000..17b6a2c
--- /dev/null
+++ b/webring/webring.opml
@@ -0,0 +1,13 @@
+
+
+
+ webring
+ webring
+ dozens
+ dozens@tilde.team
+
+
+
+
+
+
--
2.34.1
From d7c5108c5bc2dd909fb7fb8c6f6e78dabdb8a96e Mon Sep 17 00:00:00 2001
From: dozens
Date: Mon, 30 Oct 2023 13:59:37 -0600
Subject: [PATCH 2/5] =?UTF-8?q?=E2=9C=A8=20webring?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
webring/README.md | 32 +++++++++++++++++
webring/db/members.rec | 20 +++++++++++
webring/index.html | 73 +++++++++++++++++++++++++++++++++++++
webring/justfile | 38 ++++++++++++++++++++
webring/src/example.html | 77 ++++++++++++++++++++++++++++++++++++++++
webring/src/example.opml | 16 +++++++++
webring/webring.opml | 13 +++++++
7 files changed, 269 insertions(+)
create mode 100644 webring/README.md
create mode 100644 webring/db/members.rec
create mode 100644 webring/index.html
create mode 100644 webring/justfile
create mode 100644 webring/src/example.html
create mode 100644 webring/src/example.opml
create mode 100644 webring/webring.opml
diff --git a/webring/README.md b/webring/README.md
new file mode 100644
index 0000000..a09646e
--- /dev/null
+++ b/webring/README.md
@@ -0,0 +1,32 @@
+# webring
+
+the benevolent tildepals basement heroes 43beans commonheath of casakhstan webring
+
+## joining
+
+add your info to `db/members.rec`
+
+## snippet
+
+a code snippet to add to member site
+
+all you have to do (after you've been added to the db) is add a few
+anchor tags to your site. you can do something like the following,
+replacing "yoursitename" with the value of "name" you provide in
+members.rec
+
+
+
this site is a member of a very powerful webring!
+
+ < previous |
+ all |
+ next >
+
+
+
+that would end up looking something like this:
+
+ this site is a member of a very powerful webring!
+
+ < previous | all | next >
+
diff --git a/webring/db/members.rec b/webring/db/members.rec
new file mode 100644
index 0000000..3210b51
--- /dev/null
+++ b/webring/db/members.rec
@@ -0,0 +1,20 @@
+%rec: member
+%doc: a member of the webring
+%key: id
+%unique: id name url feed
+%auto: id created
+%type: id int
+%type: created date
+%type: title,url,feed line
+%typedef: Name_t regexp /[a-z]{3,13}/
+%type: name Name_t
+%allowed: id created title name url feed
+%mandatory: id title name url
+%sort: id
+
+id: 0
+created: Mon, 30 Oct 2023 13:38:40 -0600
+name: dozens
+title: dozens
+url: https://tilde.town/~dozens
+feed:
diff --git a/webring/index.html b/webring/index.html
new file mode 100644
index 0000000..7438be7
--- /dev/null
+++ b/webring/index.html
@@ -0,0 +1,73 @@
+
+
+
+
+
+ webring
+
+
+
+
+ the benevolent tildepals basement heroes 43beans commonheath of casakhstan webring
+
+
+
+
+
+
+
+
+
+
+
diff --git a/webring/justfile b/webring/justfile
new file mode 100644
index 0000000..0a3c3be
--- /dev/null
+++ b/webring/justfile
@@ -0,0 +1,38 @@
+# list all recipes
+default:
+ just --list --unsorted
+
+# add a new webring member
+new:
+ #!/usr/bin/env sh
+ read -p "name (lowercase, 3-13 characters): " name
+ read -p "title: " title
+ read -p "url: " url
+ read -p "feed: " feed
+ recins --verbose -t member \
+ -f "name" -v "$name" \
+ -f "title" -v "$title" \
+ -f "url" -v "$url" \
+ -f "feed" -v "$feed" \
+ db/members.rec
+alias add := new
+
+# build html
+html:
+ recsel db/members.rec \
+ | rec2csv \
+ | csvjson \
+ | jq '. | {data: .}' \
+ | mustache - src/example.html index.html
+
+# build opml
+opml:
+ recsel db/members.rec \
+ | rec2csv \
+ | csvjson \
+ | jq '. | {data: .}' \
+ | jq '{ data: [ .data[] | select(.feed != null) ] }' \
+ | mustache - src/example.opml webring.opml
+
+# compile html and opml
+build: html opml
diff --git a/webring/src/example.html b/webring/src/example.html
new file mode 100644
index 0000000..fb2af10
--- /dev/null
+++ b/webring/src/example.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+ webring
+
+
+
+
+ the benevolent tildepals basement heroes 43beans commonheath of casakhstan webring
+
+
+
+
+
+
+
+
+
+
+
diff --git a/webring/src/example.opml b/webring/src/example.opml
new file mode 100644
index 0000000..24b0917
--- /dev/null
+++ b/webring/src/example.opml
@@ -0,0 +1,16 @@
+
+
+
+ tildepals webring
+ tildepals webring
+ dozens
+ dozens@tilde.team
+
+
+
+ {{#data}}
+
+ {{/data}}
+
+
+
diff --git a/webring/webring.opml b/webring/webring.opml
new file mode 100644
index 0000000..17b6a2c
--- /dev/null
+++ b/webring/webring.opml
@@ -0,0 +1,13 @@
+
+
+
+ webring
+ webring
+ dozens
+ dozens@tilde.team
+
+
+
+
+
+
--
2.34.1
From ffc1c77ad0851da7b1e4f9897ace260f00100d6f Mon Sep 17 00:00:00 2001
From: dozens
Date: Mon, 30 Oct 2023 14:21:56 -0600
Subject: [PATCH 3/5] rec notes
---
webring/db/members.rec | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/webring/db/members.rec b/webring/db/members.rec
index 3210b51..7ef6cad 100644
--- a/webring/db/members.rec
+++ b/webring/db/members.rec
@@ -12,9 +12,19 @@
%mandatory: id title name url
%sort: id
+# FIELDS AND VALUES
+# id: an incrementing integer
+# created: timestamp
+# name: a short slug to be used in the query params.
+# 3 - 13 letters, lowercase, no spaces
+# title: the title of your site. can be different from
+# name. can have spaces, capital letters, etc
+# url: link to the page where the webring code will appear
+# feed: optional. a link to a rss/atom feed for your site
+
id: 0
created: Mon, 30 Oct 2023 13:38:40 -0600
name: dozens
-title: dozens
+title: tilde.town/~dozens
url: https://tilde.town/~dozens
feed:
--
2.34.1
From c735cde7bca129e52514762b56554ae8e2ef4ed9 Mon Sep 17 00:00:00 2001
From: dozens
Date: Mon, 30 Oct 2023 15:20:03 -0600
Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=92=84=20typo?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
webring/README.md | 2 +-
webring/index.html | 4 ++--
webring/src/example.html | 2 +-
webring/webring.opml | 6 +++---
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/webring/README.md b/webring/README.md
index a09646e..9c49490 100644
--- a/webring/README.md
+++ b/webring/README.md
@@ -1,6 +1,6 @@
# webring
-the benevolent tildepals basement heroes 43beans commonheath of casakhstan webring
+the benevolent tildepals basement heroes 43beans commonhealth of casakhstan webring
## joining
diff --git a/webring/index.html b/webring/index.html
index 7438be7..0f82729 100644
--- a/webring/index.html
+++ b/webring/index.html
@@ -13,14 +13,14 @@ body {
- the benevolent tildepals basement heroes 43beans commonheath of casakhstan webring
+ the benevolent tildepals basement heroes 43beans commonhealth of casakhstan webring
diff --git a/webring/src/example.html b/webring/src/example.html
index fb2af10..e8bc485 100644
--- a/webring/src/example.html
+++ b/webring/src/example.html
@@ -13,7 +13,7 @@ body {
- the benevolent tildepals basement heroes 43beans commonheath of casakhstan webring
+ the benevolent tildepals basement heroes 43beans commonhealth of casakhstan webring
diff --git a/webring/webring.opml b/webring/webring.opml
index 17b6a2c..5c1ef8c 100644
--- a/webring/webring.opml
+++ b/webring/webring.opml
@@ -1,13 +1,13 @@
- webring
- webring
+ tildepals webring
+ tildepals webring
dozens
dozens@tilde.team
-
+
--
2.34.1
From ca665dbbf34141cde137339775cd872bcf960dbc Mon Sep 17 00:00:00 2001
From: dozens
Date: Tue, 31 Oct 2023 08:43:42 -0600
Subject: [PATCH 5/5] fixes a few comments from lucidiot
- adds `htmlUrl` to opml entry items
- removes `title` from opml entity
- removes superfluous jq call, moves query to recsel
**NOTE:** mustache apparently has a quirk where when iterating over a
list, it will interpret a 0 and a 1 as false and true unless/until there
is also a 2. at which point it will start interpreting the numbers as
numbers. this commit does NOT fix this. i just manually changed the
`false` to `0` in the generated html. this problem will fix itself once
we have at least 3 webring members.
---
webring/db/members.rec | 2 +-
webring/index.html | 6 +++---
webring/justfile | 3 +--
webring/src/example.html | 4 ++--
webring/src/example.opml | 3 +--
5 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/webring/db/members.rec b/webring/db/members.rec
index 7ef6cad..647048d 100644
--- a/webring/db/members.rec
+++ b/webring/db/members.rec
@@ -12,6 +12,7 @@
%mandatory: id title name url
%sort: id
+
# FIELDS AND VALUES
# id: an incrementing integer
# created: timestamp
@@ -27,4 +28,3 @@ created: Mon, 30 Oct 2023 13:38:40 -0600
name: dozens
title: tilde.town/~dozens
url: https://tilde.town/~dozens
-feed:
diff --git a/webring/index.html b/webring/index.html
index 0f82729..8262f2a 100644
--- a/webring/index.html
+++ b/webring/index.html
@@ -47,9 +47,9 @@ body {