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.
This commit is contained in:
parent
c735cde7bc
commit
ca665dbbf3
|
@ -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:
|
||||
|
|
|
@ -47,7 +47,7 @@ body {
|
|||
<script>
|
||||
const members = [
|
||||
{
|
||||
"id": false,
|
||||
"id": 0,
|
||||
"name": "dozens",
|
||||
"url": "https://tilde.town/~dozens",
|
||||
},
|
||||
|
|
|
@ -27,11 +27,10 @@ html:
|
|||
|
||||
# build opml
|
||||
opml:
|
||||
recsel db/members.rec \
|
||||
recsel db/members.rec -e 'feed != ""' \
|
||||
| rec2csv \
|
||||
| csvjson \
|
||||
| jq '. | {data: .}' \
|
||||
| jq '{ data: [ .data[] | select(.feed != null) ] }' \
|
||||
| mustache - src/example.opml webring.opml
|
||||
|
||||
# compile html and opml
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<opml version="2.0">
|
||||
<head>
|
||||
<title>tildepals webring</title>
|
||||
<text>tildepals webring</text>
|
||||
<ownerName>dozens</ownerName>
|
||||
<ownerEmail>dozens@tilde.team</ownerEmail>
|
||||
|
@ -9,7 +8,7 @@
|
|||
<body>
|
||||
<outline text="tildepals webring" title="tildepals webring">
|
||||
{{#data}}
|
||||
<outline text="{{{name}}}" title="{{{title}}}" type="rss" xmlUrl="{{{feed}}}" />
|
||||
<outline text="{{{name}}}" title="{{{title}}}" type="rss" xmlUrl="{{{feed}}}" htmlUrl="{{{url}}}" />
|
||||
{{/data}}
|
||||
</outline>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue