- 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.
38 lines
750 B
Makefile
38 lines
750 B
Makefile
# 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 -e 'feed != ""' \
|
|
| rec2csv \
|
|
| csvjson \
|
|
| jq '. | {data: .}' \
|
|
| mustache - src/example.opml webring.opml
|
|
|
|
# compile html and opml
|
|
build: html opml
|