aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--v2/.envrc19
-rw-r--r--v2/.gitignore31
-rw-r--r--v2/Makefile18
l---------v2/TODOs.md1
-rwxr-xr-xv2/aux/checks/shellcheck.sh6
-rwxr-xr-xv2/aux/checks/todos.sh58
-rwxr-xr-xv2/aux/ci/git-post-receive.sh186
-rwxr-xr-xv2/aux/ci/git-pre-receive.sh14
-rwxr-xr-xv2/aux/ci/report.sh250
-rw-r--r--v2/aux/domain.txt1
-rw-r--r--v2/aux/lib.sh37
-rw-r--r--v2/dynamic.mk190
-rw-r--r--v2/po/euandre.org.pot574
-rw-r--r--v2/po/i18n.mappings3
-rw-r--r--v2/po/pt.po581
-rwxr-xr-xv2/src/bin/absolute89
-rwxr-xr-xv2/src/bin/categories80
-rwxr-xr-xv2/src/bin/category80
-rwxr-xr-xv2/src/bin/coll2path88
-rwxr-xr-xv2/src/bin/collection-for87
-rwxr-xr-xv2/src/bin/collections69
-rwxr-xr-xv2/src/bin/conf228
-rwxr-xr-xv2/src/bin/dyn-po4a113
-rwxr-xr-xv2/src/bin/eslaide77
-rwxr-xr-xv2/src/bin/feed112
-rwxr-xr-xv2/src/bin/html234
-rwxr-xr-xv2/src/bin/i18n97
-rwxr-xr-xv2/src/bin/index152
-rwxr-xr-xv2/src/bin/indexentry73
-rwxr-xr-xv2/src/bin/lang-for73
-rwxr-xr-xv2/src/bin/langs69
-rwxr-xr-xv2/src/bin/makemake253
-rwxr-xr-xv2/src/bin/mapentry75
-rwxr-xr-xv2/src/bin/security-txt82
-rwxr-xr-xv2/src/bin/series102
-rwxr-xr-xv2/src/bin/sitemap72
-rwxr-xr-xv2/src/bin/url-for93
-rwxr-xr-xv2/src/bin/xmlentry81
-rw-r--r--v2/src/content/.well-known/security.txt4
-rw-r--r--v2/src/content/en/about.page7
-rw-r--r--v2/src/content/en/pastebin/guix-shebang.md15
-rw-r--r--v2/src/content/en/pastebin/raku-tuple-type-annotation.md33
-rw-r--r--v2/src/content/en/pastebin/sicp-exercise-3-19.md109
-rw-r--r--v2/src/content/en/remembering-ann.md186
-rw-r--r--v2/src/content/en/slide/local-first.ps522
-rw-r--r--v2/src/content/en/slide/local-first.slides204
-rw-r--r--v2/src/content/en/slide/rollouts.ps500
-rw-r--r--v2/src/content/en/slide/rollouts.slides208
-rw-r--r--v2/src/content/en/til/lisp-three-way-conditional.md59
-rw-r--r--v2/src/content/favicon.icobin1150 -> 0 bytes
-rw-r--r--v2/src/content/img/alt/atom.en.txt1
-rw-r--r--v2/src/content/img/alt/atom.pt.txt1
-rw-r--r--v2/src/content/img/alt/envelope.en.txt1
-rw-r--r--v2/src/content/img/alt/envelope.pt.txt1
-rw-r--r--v2/src/content/img/alt/favicon.en.txt1
-rw-r--r--v2/src/content/img/alt/favicon.pt.txt1
-rw-r--r--v2/src/content/img/alt/link.en.txt1
-rw-r--r--v2/src/content/img/alt/link.pt.txt1
-rw-r--r--v2/src/content/img/alt/linkto.en.txt1
-rw-r--r--v2/src/content/img/alt/linkto.pt.txt2
-rw-r--r--v2/src/content/img/alt/lock.en.txt1
-rw-r--r--v2/src/content/img/alt/lock.pt.txt1
-rw-r--r--v2/src/content/img/atom.svg5
-rw-r--r--v2/src/content/img/dark-mode.xml12
-rw-r--r--v2/src/content/img/envelope.svg.uncolored4
-rw-r--r--v2/src/content/img/favicon.svg.uncolored62
-rw-r--r--v2/src/content/img/link.svg.uncolored5
-rw-r--r--v2/src/content/img/linkto.svg.uncolored7
-rw-r--r--v2/src/content/img/lock.svg.uncolored4
-rw-r--r--v2/src/content/pt/hea/condicional-ternario-lisp.md65
-rw-r--r--v2/src/content/pt/pastebin/exercicios-sicp-e-19.md105
-rw-r--r--v2/src/content/pt/sobre.page7
-rw-r--r--v2/src/content/public.asc.txt86
-rw-r--r--v2/src/content/style.css205
-rw-r--r--v2/src/lib.sh33
-rw-r--r--v2/src/lib/base.conf8
-rw-r--r--v2/src/lib/base.en.conf61
-rw-r--r--v2/src/lib/base.pt.conf61
-rw-r--r--v2/src/lib/category-header.html6
-rw-r--r--v2/src/lib/category.html3
-rw-r--r--v2/src/lib/commencement.en.conf9
-rw-r--r--v2/src/lib/commencement.pt.conf9
-rw-r--r--v2/src/lib/comment.en.html8
-rw-r--r--v2/src/lib/comment.pt.html6
-rw-r--r--v2/src/lib/date.en.html3
-rw-r--r--v2/src/lib/date.pt.html3
-rw-r--r--v2/src/lib/entry.html5
-rw-r--r--v2/src/lib/entry.xml22
-rw-r--r--v2/src/lib/feed.xml15
-rw-r--r--v2/src/lib/index-postamble.html8
-rw-r--r--v2/src/lib/index-preamble.html7
-rw-r--r--v2/src/lib/mapentry.xml5
-rw-r--r--v2/src/lib/postamble.html25
-rw-r--r--v2/src/lib/preamble.html51
-rw-r--r--v2/src/lib/update.en.html3
-rw-r--r--v2/src/lib/update.pt.html3
-rw-r--r--v2/src/redirect.mappings3
97 files changed, 0 insertions, 7232 deletions
diff --git a/v2/.envrc b/v2/.envrc
deleted file mode 100644
index c2de306..0000000
--- a/v2/.envrc
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-set -eu
-
-export GIT_DIR="$PWD"/../.git
-export GIT_WORK_TREE="$PWD"/../
-
-export PATH="$PWD/src/bin:$PATH"
-
-export DOMAIN='euandre.org'
-export EMAIL='eu@euandre.org'
-export CONTENT_PREFIX='src/content'
-export COLLECTIONS='
-article
-til
-pastebin
-'
-export LAYOUTS='
-slides slide
-'
diff --git a/v2/.gitignore b/v2/.gitignore
deleted file mode 100644
index e824ac3..0000000
--- a/v2/.gitignore
+++ /dev/null
@@ -1,31 +0,0 @@
-/generated.mk
-/*.sentinel
-/po/po4a.cfg
-/po/*.mo
-/public/
-/src/lib/generated.conf
-/src/lib/generated.*.conf
-/src/content/**/index.extrafeeds
-/src/content/**/*.categories
-/src/content/**/*.category
-/src/content/**/*.categoryentry
-/src/content/**/*.categorysort
-/src/content/**/*.conf
-/src/content/**/*.content
-/src/content/**/*.html
-/src/content/**/*.extrahtml
-/src/content/**/*.i18n
-/src/content/**/*.mapentry
-/src/content/**/*.md.next
-/src/content/**/*.md.prev
-/src/content/**/*.md.tmp
-/src/content/**/*.htmlbody
-/src/content/**/*.series
-/src/content/**/*.snippets
-/src/content/**/*.html.*.txt
-/src/content/**/*.sortdata
-/src/content/**/*.indexentry
-/src/content/**/*.xmlentry
-/src/content/**/*.xml
-/src/content/*/slide/*.pdf
-/src/content/.gitignore
diff --git a/v2/Makefile b/v2/Makefile
deleted file mode 100644
index f98c9ef..0000000
--- a/v2/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-.POSIX:
-.DEFAULT:
- $(MAKE) deps
- $(MAKE) -f dynamic.mk $<
-
-all: deps
- $(MAKE) -f dynamic.mk all
-
-deps: generated.mk po/po4a.cfg
-
-generated.mk: ALWAYS
- makemake > generated.mk
-
-po/po4a.cfg: ALWAYS
- dyn-po4a < po/i18n.mappings | ifnew $@
- po4a $@
-
-ALWAYS:
diff --git a/v2/TODOs.md b/v2/TODOs.md
deleted file mode 120000
index 090bb76..0000000
--- a/v2/TODOs.md
+++ /dev/null
@@ -1 +0,0 @@
-../TODOs.md \ No newline at end of file
diff --git a/v2/aux/checks/shellcheck.sh b/v2/aux/checks/shellcheck.sh
deleted file mode 100755
index 585a75f..0000000
--- a/v2/aux/checks/shellcheck.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-set -eu
-
-git ls-files |
- xargs awk '/^#!\/bin\/sh$/ { print FILENAME } { nextfile }' |
- xargs shellcheck -x
diff --git a/v2/aux/checks/todos.sh b/v2/aux/checks/todos.sh
deleted file mode 100755
index 6325ebd..0000000
--- a/v2/aux/checks/todos.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-set -eu
-
-if [ -e .git ] && git grep FIXME | grep -v '^TODOs.md' |
- grep -v '^aux/checks/todos.sh'; then
- echo "Found dangling FIXME markers on the project."
- echo "You should write them down properly on TODOs.md."
- exit 1
-fi
-
-awk -F'{#' '
-BEGIN {
- exitstatus = 0
- h2flag = 0
- h2status = ""
- prevline = ""
- idx = 0
- delete ids[0]
-}
-h2flag == 1 {
- split($0, l, " ")
- timelinestatus = l[2]
- if (h2status != timelinestatus) {
- print "h2/timeline status mismatch for line " NR-1
- print prevline
- print $0
- exitstatus = 1
- }
- h2status = ""
- h2flag = 0
-}
-
-/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE|WONTFIX)/ {
- if (match($0, / \{#.*?\}.*$/) == 0) {
- print "Missing ID for line " NR ":\n" $0
- exitstatus = 1
- }
- id_with_prefix = substr($2, 0, length($2) - 1)
- match(id_with_prefix, /^\w+-/)
- id = substr(id_with_prefix, RLENGTH + 1)
- if (id in arr) {
- print "Duplicate ID: " id
- exitstatus = 1
- } else {
- arr[id] = 1
- }
-
- split($0, l, " ")
- h2status = l[2]
- h2flag = 1
- prevline = $0
-}
-
-
-/^# Scratch$/ {
- exit exitstatus
-}
-' TODOs.md
diff --git a/v2/aux/ci/git-post-receive.sh b/v2/aux/ci/git-post-receive.sh
deleted file mode 100755
index 76adccf..0000000
--- a/v2/aux/ci/git-post-receive.sh
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/bin/sh
-# shellcheck source=/dev/null disable=2317
-. /etc/rc
-set -eu
-
-
-# shellcheck disable=2034
-read -r _oldrev SHA REFNAME
-
-if [ "$SHA" = '0000000000000000000000000000000000000000' ]; then
- exit
-fi
-
-
-SKIP_DEPLOY=false
-for n in $(seq 0 $((GIT_PUSH_OPTION_COUNT - 1))); do
- opt="$(eval "printf '%s' \"\$GIT_PUSH_OPTION_$n\"")"
- case "$opt" in
- ci.skip)
- cat <<-EOF
-
- "$opt" option detected, not running CI.
-
- EOF
- exit
- ;;
- deploy.skip)
- SKIP_DEPLOY=true
- ;;
- *)
- ;;
- esac
-done
-
-
-epoch() {
- awk 'BEGIN { srand(); print(srand()); }'
-}
-
-now() {
- date '+%Y-%m-%dT%H:%M:%S%:z'
-}
-
-NAME="$(basename "$PWD" .git)"
-LOGS_DIR=/var/log/ci/"$NAME"/
-HTML_OUTDIR="/srv/www/s/$NAME"
-TIMESTAMP="$(now)"
-FILENAME="$TIMESTAMP-$SHA.log"
-LOGFILE="$LOGS_DIR/$FILENAME"
-mkdir -p "$LOGS_DIR"
-
-
-END_MARKER='\033[0m'
-LIGHT_BLUE_B='\033[1;36m'
-YELLOW='\033[1;33m'
-
-blue() {
- printf "${LIGHT_BLUE_B}%s${END_MARKER}" "$1"
-}
-
-yellow() {
- printf "${YELLOW}%s${END_MARKER}" "$1"
-}
-
-info() {
- sed "s|^\(.\)|$(blue 'CI'): \1|"
-}
-
-
-uuid() {
- od -xN20 /dev/urandom |
- head -n1 |
- awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}'
-}
-
-tmpname() {
- printf '%s/uuid-tmpname with spaces.%s' "${TMPDIR:-/tmp}" "$(uuid)"
-}
-
-mkdtemp() {
- name="$(tmpname)"
- mkdir -- "$name"
- printf '%s' "$name"
-}
-
-
-{
- cat <<-EOF | info
- Starting CI job at: $(now)
- EOF
- START="$(epoch)"
-
- duration() {
- if [ "$RUN_DURATION" -gt 60 ]; then
- cat <<-EOF
- $(yellow 'WARNING'): run took more than 1 minute! ($RUN_DURATION seconds)
- EOF
- else
- cat <<-EOF
- Run took $RUN_DURATION seconds.
- EOF
- fi
- }
-
- finish() {
- STATUS="$?"
- END="$(epoch)"
- RUN_DURATION=$((END - START))
- cat <<-EOF | info
- Finishing CI job at: $(now)
- Exit status was $STATUS
- Re-run with:
- \$ $CMD
- $(duration)
- EOF
-
- NOTE="$(
- cat <<-EOF
- See CI logs with:
- git notes --ref=refs/notes/ci-logs show $SHA
- git notes --ref=refs/notes/ci-data show $SHA
-
- Exit status: $STATUS
- Duration: $RUN_DURATION
- EOF
- )"
- git notes --ref=refs/notes/ci-data add -f -m "$(
- cat <<-EOF
- status $STATUS
- sha $SHA
- filename $FILENAME
- duration $RUN_DURATION
- timestamp $TIMESTAMP
- to-prod $TO_PROD
- refname $REFNAME
- EOF
- )" "$SHA"
- git notes --ref=refs/notes/ci-logs add -f -F "$LOGFILE" "$SHA"
- git notes add -f -m "$NOTE" "$SHA"
-
- {
- printf 'Git CI HTML report for %s (%s) started.\n' "$NAME" "$SHA" >&2
- DIR="$(mkdtemp)"
- REMOTE="$PWD"
- cd "$DIR"
- {
- git clone "$REMOTE" .
- git fetch origin 'refs/notes/*:refs/notes/*'
- } 1>/dev/null 2>&1
- sh aux/ci/report.sh -n "$NAME" -o public-ci
- sudo -u deployer mkdir -p "$HTML_OUTDIR"/ci/
- sudo -u deployer rsync \
- --chmod=D775,F664 \
- --chown=deployer:deployer \
- --delete \
- -a \
- public-ci/ "$HTML_OUTDIR"/ci/
- rm -rf "$DIR"
- printf 'Git CI HTML report for %s (%s) finished.\n' "$NAME" "$SHA" >&2
- } 2>&1 | logger -i -p local0.warn -t git-ci 1>/dev/null 2>&1 &
- }
- trap finish EXIT
-
- unset GIT_DIR
-
- if [ "$REFNAME" = 'refs/heads/main' ] && [ "$SKIP_DEPLOY" = false ]; then
- cat <<-EOF | info
- In branch "main", running deploy for $SHA.
- EOF
- TO_PROD=true
- CMD="sudo cicd $NAME $SHA"
- else
- if [ "$SKIP_DEPLOY" = true ]; then
- cat <<-EOF | info
- "deploy.skip" option detected, skipping deploy for $SHA.
- EOF
- else
- cat <<-EOF | info
- Not on branch "main", skipping deploy for $SHA.
- EOF
- fi
- TO_PROD=false
- CMD="sudo cicd -n $NAME $SHA"
- fi
- $CMD
-} 2>&1 | ts -s '%.s' | tee "$LOGFILE"
diff --git a/v2/aux/ci/git-pre-receive.sh b/v2/aux/ci/git-pre-receive.sh
deleted file mode 100755
index 199d06e..0000000
--- a/v2/aux/ci/git-pre-receive.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-set -eu
-
-read -r _oldrev SHA _refname
-unset GIT_DIR
-
-if [ "$SHA" = '0000000000000000000000000000000000000000' ]; then
- exit
-fi
-
-printf 'Upgrading post-receive hook...' >&2
-git show "$SHA":aux/ci/git-post-receive.sh > hooks/post-receive
-chmod +x hooks/post-receive
-printf 'done.\n' >&2
diff --git a/v2/aux/ci/report.sh b/v2/aux/ci/report.sh
deleted file mode 100755
index 0a0a0ae..0000000
--- a/v2/aux/ci/report.sh
+++ /dev/null
@@ -1,250 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- aux/ci/report.sh -o OUTDIR
- aux/ci/report.sh -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -o OUTDIR the directory where to place the generated files
- -h, --help show this message
-
-
- Gather data from Git Notes, and generate an HTML report on CI runs.
-
- Two refs with notes are expected:
- 1. refs/notes/ci-data: contains metadata abount the CI runs,
- with timestamps, filenames and exit status;
- 2. refs/notes/ci-logs: contains the content of the log.
-
- When reconstructing the CI run, the $FILENAME present in
- the refs/notes/ci-data ref names the file, and its content comes
- from refs/notes/ci-logs.
-
- On a CI run that generated the numbers from 1 to 10, for a file named
- 'my-ci-run-2020-01-01-deadbeef.log' that exited successfully, ran for
- 15 seconds and was deployed to production, the expected output on the
- target directory "public" is:
-
- $ tree public/
- public/
- index.html
- data/
- 2020-01-01T01:00:00-deadbeef.log
- ...
- logs/
- 2020-01-01T01:00:00-deadbeef.log
- ...
-
- $ cat public/data/2020-01-01T01:00:00-deadbeef.log
- status 0
- sha deadbeef
- filename deadbeef 2020-01-01T01:00:00-deadbeef.log
- duration 15
- timestamp 2020-01-01T01:00:00
- to-prod true
- refname refs/heads/main
-
- $ cat public/logs/2020-01-01T01:00:00-deadbeef.log
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
-
- The generated 'index.html' is a webpage with the list of all known
- CI runs, their status, a link to the commit and a link to the
- log and data files.
-
- To enable fetching these refs by default, do so in the git config:
-
- $ git config --add remote.origin.fetch '+refs/notes/*:refs/notes/*'
-
-
- Examples:
-
- Generate the report on the 'www' directory:
-
- $ sh aux/ci/report.sh -o www
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'o:h' flag; do
- case "$flag" in
- o)
- OUTDIR="$OPTARG"
- ;;
- h)
- usage
- help
- exit
- ;;
- *)
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. aux/lib.sh
-
-eval "$(assert_arg "${OUTDIR:-}" '-o OUTDIR')"
-
-
-esc() {
- sed \
- -e 's|&|\&amp;|g' \
- -e 's|<|\&lt;|g' \
- -e 's|>|\&gt;|g' \
- -e 's|"|\&quot;|g' \
- -e "s|'|\&#39;|g"
-}
-
-mkdir -p "$OUTDIR"
-cd "$OUTDIR"
-mkdir -p logs data
-
-for c in $(git notes list | cut -d' ' -f2); do
- git notes --ref=refs/notes/ci-data show "$c" > data/FILENAME-tmp
- FILENAME="$(grep '^filename ' data/FILENAME-tmp | cut -d' ' -f2-)"
- mv data/FILENAME-tmp data/"$FILENAME"
- git notes --ref=refs/notes/ci-logs show "$c" > logs/"$FILENAME"
-done
-
-{
- cat <<-EOF
- <!DOCTYPE html>
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <meta name="description" content="CI logs for $NAME" />
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
- <title>$NAME - CI logs</title>
- <style>
- body {
- max-width: 800px;
- margin: 0 auto;
- }
-
- code {
- display: block;
- margin: 1em 0em 3em 3em;
- overflow: auto;
- }
-
- pre {
- display: inline;
- }
-
- ol {
- list-style-type: disc;
- }
-
- pre, code {
- background-color: #ddd;
- }
-
- @media(prefers-color-scheme: dark) {
- :root {
- color: white;
- background-color: black;
- }
-
- a {
- color: hsl(211, 100%, 60%);
- }
-
- a:visited {
- color: hsl(242, 100%, 80%);
- }
-
- pre, code {
- background-color: #222;
- }
- }
- </style>
- </head>
- <body>
- <main>
- <h1>
- CI logs for
- <a href="https://$DOMAIN/s/$NAME/">$NAME</a>
- </h1>
- <ol>
- EOF
-
-
- PASS='&#x2705;' # ✅
- WARN='&#x1F40C;' # ðŸŒ
- FAIL='&#x274C;' # âŒ
- find data/ -type f | LANG=C.UTF-8 sort -r | while read -r f; do
- STATUS="$( grep '^status ' "$f" | cut -d' ' -f2- | esc)"
- SHA="$( grep '^sha ' "$f" | cut -d' ' -f2- | esc)"
- FILENAME="$(grep '^filename ' "$f" | cut -d' ' -f2- | esc)"
- DURATION="$(grep '^duration ' "$f" | cut -d' ' -f2- | cut -d'"' -f1 | esc)"
- MESSAGE="$({
- git log -1 --format=%B "$SHA" || {
- git fetch origin "$SHA"
- git log -1 --format=%B "$SHA"
- }
- } | esc)"
-
- if [ "$STATUS" = 0 ]; then
- if [ "$DURATION" -le 60 ]; then
- STATUS_MARKER="$PASS"
- else
- STATUS_MARKER="$WARN"
- fi
- else
- STATUS_MARKER="$FAIL"
- fi
-
- cat <<-EOF
- <li id="$FILENAME">
- <a href="#$FILENAME"><pre>#</pre></a>
- $STATUS_MARKER - <pre>${DURATION:-?}s</pre>
- <pre>(<a href="https://$DOMAIN/git/$NAME/commit/?id=$SHA">commit</a>)</pre>
- <a href="logs/$FILENAME"><pre>$FILENAME</pre></a>
- <pre>(<a href="data/$FILENAME">data</a>)</pre>
- <br />
- <code><pre>$MESSAGE</pre></code>
- </li>
- EOF
- done
-
- cat <<-EOF
- </ol>
- </main>
- </body>
- </html>
- EOF
-} > index.html
diff --git a/v2/aux/domain.txt b/v2/aux/domain.txt
deleted file mode 100644
index fd7ea0f..0000000
--- a/v2/aux/domain.txt
+++ /dev/null
@@ -1 +0,0 @@
-euandre.org
diff --git a/v2/aux/lib.sh b/v2/aux/lib.sh
deleted file mode 100644
index 93a37eb..0000000
--- a/v2/aux/lib.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-
-DOMAIN="$(cat aux/domain.txt)"
-NAME="$(basename "$PWD")"
-export DOMAIN NAME
-
-assert_arg() {
- if [ -z "$1" ]; then
- printf 'Missing %s.\n\n' "$2" >&2
- cat <<-'EOF'
- usage >&2
- exit 2
- EOF
- fi
-}
-
-uuid() {
- od -xN20 /dev/urandom |
- head -n1 |
- awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}'
-}
-
-tmpname() {
- printf '%s/uuid-tmpname-without-spaces.%s' "${TMPDIR:-/tmp}" "$(uuid)"
-}
-
-mkstemp() {
- name="$(tmpname)"
- touch -- "$name"
- printf '%s' "$name"
-}
-
-mkdtemp() {
- name="$(tmpname)"
- mkdir -p -- "$name"
- printf '%s' "$name"
-}
diff --git a/v2/dynamic.mk b/v2/dynamic.mk
deleted file mode 100644
index 9d1339c..0000000
--- a/v2/dynamic.mk
+++ /dev/null
@@ -1,190 +0,0 @@
-.POSIX:
-
-
-all:
-
-include generated.mk
-
-
-.SUFFIXES:
-.SUFFIXES: .page .md .content .conf .html .categoryentry .indexentry .xmlentry
-.SUFFIXES: .mapentry .uncolored .slides .ps .pdf
-
-
-.page.md:
- ln -f $<.i18n $@.i18n
- ln -f $< $@
- touch $@ $@.i18n
-
-.md.content:
- awk 'sep >= 2; /^---$$/ {sep++}' < $< > $@
-
-.md.conf:
- conf $< > $@
-
-.md.html:
- html $< > $@
-
-.md.categoryentry:
- category $< > $@
-
-.md.indexentry:
- indexentry $< > $@
-
-.md.xmlentry:
- xmlentry $< > $@
-
-.md.mapentry:
- mapentry $< > $@
-
-.uncolored:
- printf '%s\n%s\n%s\n' \
- "`head -n2 $<`" \
- "`cat src/content/img/dark-mode.xml`" \
- "`tail -n +3 $<`" \
- > $@
-
-.slides.ps:
- eslaide $< > $@
-
-.ps.pdf:
- ps2pdf $< $@
-
-
-all: public
-
-
-$(all-generated.conf) $(all-generated.content): $(non-content)
-$(all-generated.conf) $(pages-mds): i18n-index.sentinel
-$(all-generated.conf): src/lib/base.conf src/lib/generated.conf
-
-src/lib/generated.conf: src/bin/conf $(svgs)
- conf > $@
-
-$(all-generated.categories):
- categories $@
-
-$(all-generated.index): src/lib/generated.conf
- index $@
-
-$(all-generated.xml):
- feed $@
-
-$(all-generated.series):
- series $@
-
-i18n-index.sentinel: po/i18n.mappings
- i18n < po/i18n.mappings
- touch $@
-
-clean:
- rm -rf \
- $(all-generated) $(pages-mds) $(svgs) public/ *.sentinel \
- generated.mk po/po4a.cfg po/*.mo \
- src/lib/generated.conf src/lib/generated.*.conf \
- src/content/.gitignore src/content/sitemap.xml \
- src/content/*/*.category src/content/*/*/*.category \
- src/content/*/*.categorysort src/content/*/*/*.categorysort \
- src/content/*/*.html src/content/*/*/*.html \
- src/content/*/*.extrahtml src/content/*/*/*.extrahtml \
- src/content/*/*.extrafeeds src/content/*/*/*.extrafeeds \
- src/content/*/*.html.*.txt src/content/*/*/*.html.*.txt \
- src/content/*/*.i18n src/content/*/*/*.i18n \
- src/content/*/*.sortdata src/content/*/*/*.sortdata \
- src/content/*/feed.*.xml src/content/*/*/feed.*.xml \
- src/content/*/*.md.next src/content/*/*/*.md.next \
- src/content/*/*.md.prev src/content/*/*/*.md.prev \
-
-
-public: symlink-mappings.sentinel copy-content.sentinel copy-containers.sentinel
-
-content = \
- $(all-generated.html) \
- $(all-generated.index) \
- $(all-generated.xml) \
- $(all-generated.pdf) \
- $(static-content) \
- $(svgs) \
- src/content/sitemap.xml \
-
-containers = \
- $(all-generated.snippets) \
- $(all-generated.extrahtml) \
- $(all-generated.extrafeeds) \
-
-
-src/content/sitemap.xml: $(all-generated.mapentry)
- sitemap > $@
-
-symlink-mappings.sentinel: src/redirect.mappings
- awk '{print $$2}' src/redirect.mappings | \
- xargs dirname | \
- sort | \
- uniq | \
- xargs -P`nproc` -I% mkdir -p public/%
- < src/redirect.mappings \
- awk '{ printf "ln -rfs public/%s public/%s\n", $$2, $$1 }' | \
- sh
- touch $@
-
-copy-content.sentinel: $(content) content-mkdir.sentinel
- echo $? | \
- tr ' ' '\n' | \
- grep '^src/content/' | \
- sed 's|^src/content/||' | \
- xargs -P`nproc` -I% ln -f src/content/% public/%
- touch $@
-
-copy-containers.sentinel: $(containers) content-mkdir.sentinel
- echo $? | tr ' ' '\n' | grep '^src/content/' | \
- xargs sed 's|^src/content/||' | \
- xargs -P`nproc` -I% ln -f src/content/% public/%
- touch $@
-
-content-mkdir.sentinel: $(content) $(containers)
- echo $? | \
- tr ' ' '\n' | \
- grep '^src/content/' | \
- sed 's|^src/content/||' | \
- xargs dirname | \
- sort | \
- uniq | \
- xargs -P`nproc` -I% mkdir -p public/%
- touch $@
-
-
-src/content/favicon.ico: src/content/img/favicon.svg
- convert src/content/img/favicon.svg $@
-
-src/content/public.asc.txt:
- gpg --armour --export '$(EMAIL)' > $@
-
-src/content/.well-known/security.txt: \
- src/content/public.asc.txt src/bin/security-txt
- security-txt > $@
-
-
-
-test-files = \
- aux/checks/shellcheck.sh \
- aux/checks/todos.sh \
-
-aux/checks/shellcheck.sh: src/lib/generated.conf
-
-$(test-files): ALWAYS
- sh $@
-
-check: $(test-files)
-
-run: all
- serve -d public/
-
-deploy: public
- rsync \
- --rsync-path='sudo -u deployer rsync' \
- -avzP \
- --delete \
- --exclude 's/*' \
- public/ $(DOMAIN):/srv/www/
-
-ALWAYS:
diff --git a/v2/po/euandre.org.pot b/v2/po/euandre.org.pot
deleted file mode 100644
index 0b0f044..0000000
--- a/v2/po/euandre.org.pot
+++ /dev/null
@@ -1,574 +0,0 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2023-04-10 21:07-0300\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. type: Plain text
-#: src/content/img/alt/atom.en.txt:1
-msgid "three yellow lines representing an Atom feed"
-msgstr ""
-
-#. type: Plain text
-#: src/content/img/alt/envelope.en.txt:1
-msgid "an envelope icon representing an email address"
-msgstr ""
-
-#. type: Plain text
-#: src/content/img/alt/favicon.en.txt:1
-msgid "a crude hand doing a thumbs up"
-msgstr ""
-
-#. type: Plain text
-#: src/content/img/alt/link.en.txt:1
-msgid "two chain rings, representing an anchor to this header"
-msgstr ""
-
-#. type: Plain text
-#: src/content/img/alt/linkto.en.txt:1
-msgid ""
-"a drawing of a box with an arrow going outwards, representing an internal "
-"link"
-msgstr ""
-
-#. type: Plain text
-#: src/content/img/alt/lock.en.txt:1
-msgid "a lock icon representing a GPG public key"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:2
-msgid "export date_fmt='%B %-d, %Y'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:4
-msgid "export site_name=\"EuAndreh's website\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:6
-msgid "export lang='en'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:8
-msgid "export about='About'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:10
-msgid "export about_url_name='about.html'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:12
-msgid "export by_category_url_name='by-category.html'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:14
-msgid "export homepage_url=\"$(url-for \"$lang/\")\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:16
-msgid "export homepage_url_absolute=\"$(absolute \"$homepage_url\")\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:18
-msgid "export about_url=\"$(url-for \"$lang/$about_url_name\")\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:21
-msgid "export index_article_title='Blog'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:23
-msgid "export index_recent_article_title='Recent articles'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:25
-msgid "export index_category_article_title='Articles by category'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:27
-msgid ""
-"export index_article_url=\"$(url-for \"$lang/$(coll2path \"$lang\" "
-"article)\")\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:29
-msgid "export feed_article_title=\"EuAndreh's articles\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:32
-msgid "export index_pastebin_title='Pastebins'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:34
-msgid "export index_recent_pastebin_title='Pastebins listing'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:36
-msgid "export index_category_pastebin_title='Pastebins by category'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:38
-msgid ""
-"export index_pastebin_url=\"$(url-for \"$lang/$(coll2path \"$lang\" "
-"pastebin)\")\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:40
-msgid "export feed_pastebin_title=\"EuAndreh's pastebins\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:43
-msgid "export index_til_title='TIL'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:45
-msgid "export index_recent_til_title='TIL listing'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:47
-msgid "export index_category_til_title='TIL by category'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:49
-msgid "export index_til_url=\"$(url-for \"$lang/$(coll2path \"$lang\" til)\")\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:51
-msgid "export feed_til_title=\"EuAndreh's TIL\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:54
-msgid "export index_slide_title='Slides'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:56
-msgid "export index_recent_slide_title='Slides listing'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:58
-msgid "export index_category_slide_title='Slides by category'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:60
-msgid "export index_slide_url=\"$(url-for \"$lang/$(coll2path \"$lang\" slide)\")\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:61
-msgid "export feed_slide_title=\"EuAndreh's slides\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/commencement.en.conf:2
-msgid "#!/bin/sh"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/commencement.en.conf:4
-msgid "export article_collection_name=''"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/commencement.en.conf:6
-msgid "export pastebin_collection_name='pastebin'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/commencement.en.conf:8
-msgid "export til_collection_name='til'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/commencement.en.conf:9
-msgid "export slide_collection_name='slide'"
-msgstr ""
-
-#. type: Content of: <p>
-#: src/lib/comment.en.html:3
-msgid ""
-"<a href=\"$mailto_uri\">Comment</a> and see <a "
-"href=\"$discussions_url\">existing discussions</a> | <a "
-"href=\"$sourcecode_url\">view source</a>"
-msgstr ""
-
-#. type: Content of: <p>
-#: src/lib/date.en.html:2
-msgid "Posted on"
-msgstr ""
-
-#. type: Content of: <p><time>
-#: src/lib/date.en.html:2
-msgid "$formatted_date"
-msgstr ""
-
-#. type: Content of: <p>
-#: src/lib/update.en.html:2
-msgid "Updated on"
-msgstr ""
-
-#. type: Content of: <p><time>
-#: src/lib/update.en.html:2
-msgid "$formatted_update"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/about.page:1 src/content/en/about.page:5
-#: src/content/en/pastebin/sicp-exercise-3-19.md:1
-#: src/content/en/pastebin/sicp-exercise-3-19.md:9
-#: src/content/en/til/lisp-three-way-conditional.md:1
-#: src/content/en/til/lisp-three-way-conditional.md:11
-#, no-wrap
-msgid "---\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/about.page:4
-msgid "title: About"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/about.page:7
-msgid "It's all about me, baby!"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:4
-msgid "title: SICP exercise 3.19"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:6
-msgid "date: 2021-09-02"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:8
-msgid "categories: lisp programming-languages"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:12
-msgid "Some content here, before:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:22
-#, no-wrap
-msgid ""
-"```scheme\n"
-"(define (cycle? l)\n"
-" (define (rec l x)\n"
-" (cond\n"
-" ((null? x) false)\n"
-" ((eq? l x) true)\n"
-" (true (rec l (cdr x)))))\n"
-" (rec l (cdr l)))\n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:24
-msgid "Sample interactive session:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:41
-#, no-wrap
-msgid ""
-"```scheme\n"
-"scheme@(guile-user)> (define true #t)\n"
-"scheme@(guile-user)> (define false #f)\n"
-"scheme@(guile-user)>\n"
-"(define (cycle? l)\n"
-" (define (rec l x)\n"
-" (cond\n"
-" ((null? x) false)\n"
-" ((eq? l x) true)\n"
-" (true (rec l (cdr x)))))\n"
-" (rec l (cdr l)))\n"
-"scheme@(guile-user)> (cycle? '(1 2 3))\n"
-"$9 = #f\n"
-"scheme@(guile-user)> (cycle? (make-cycle '(1 2 3)))\n"
-"$10 = #t\n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:43
-msgid "# An h1"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:45
-msgid "a list:"
-msgstr ""
-
-#. type: Bullet: '1. '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:49
-#, markdown-text
-msgid "one"
-msgstr ""
-
-#. type: Bullet: '2. '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:49
-#, markdown-text
-msgid "two"
-msgstr ""
-
-#. type: Bullet: '3. '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:49
-#, markdown-text
-msgid "three"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:51
-msgid "some content."
-msgstr ""
-
-#. type: Bullet: '- '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:55
-#, markdown-text
-msgid "item"
-msgstr ""
-
-#. type: Bullet: '- '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:55
-#, markdown-text
-msgid "another"
-msgstr ""
-
-#. type: Bullet: '- '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:55
-#, markdown-text
-msgid "yet another"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:57
-msgid "## An h2"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:59
-msgid "Xablau:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:62
-msgid "``` xupliu 1"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:65
-msgid "3 4"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:72
-msgid "dez ```"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:74
-msgid "Foi `wikiwiu`."
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:76
-msgid "a very long code block:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:82
-#, no-wrap
-msgid ""
-"```\n"
-"wef\n"
-"wef wef wef wef\n"
-"wef wef wef wef we "
-"fwef wef wef wef wef \n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:84
-msgid "Someone said:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:86
-msgid "> Xablau, xupliu."
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:89
-msgid "### A repeated header ### A repeated header"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:91
-msgid "a big list:"
-msgstr ""
-
-#. type: Bullet: '1. '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:109
-#, markdown-text
-msgid "a"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:4
-msgid "title: Three-way conditional for number signs on Lisp"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:6
-msgid "date: 2021-04-24 3"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:8
-msgid "update: 2021-08-14"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:10
-#, no-wrap
-msgid "categories: lisp scheme common-lisp\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:14
-msgid "A useful macro from Paul Graham's [On Lisp][on-lisp] book:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:23
-#, no-wrap
-msgid ""
-"```lisp\n"
-"(defmacro nif (expr pos zero neg)\n"
-" (let ((g (gensym)))\n"
-" `(let ((,g ,expr))\n"
-" (cond ((plusp ,g) ,pos)\n"
-" ((zerop ,g) ,zero)\n"
-" (t ,neg)))))\n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:25
-msgid ""
-"After I looked at this macro, I started seeing opportunities to using it in "
-"many places, and yet I didn't see anyone else using it."
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:27
-msgid ""
-"The latest example I can think of is section 1.3.3 of [Structure and "
-"Interpretation of Computer Programs][sicp], which I was reading recently:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:40
-#, no-wrap
-msgid ""
-"```scheme\n"
-"(define (search f neg-point pos-point)\n"
-" (let ((midpoint (average neg-point pos-point)))\n"
-" (if (close-enough? neg-point post-point)\n"
-" midpoint\n"
-" (let ((test-value (f midpoint)))\n"
-" (cond ((positive? test-value)\n"
-" (search f neg-point midpoint))\n"
-" ((negative? test-value)\n"
-" (search f midpoint pos-point))\n"
-" (else midpoint))))))\n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:42
-msgid ""
-"Not that the book should introduce such macro this early, but I couldn't "
-"avoid feeling bothered by not using the `nif` macro, which could even remove "
-"the need for the intermediate `test-value` variable:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:53
-#, no-wrap
-msgid ""
-"```scheme\n"
-"(define (search f neg-point pos-point)\n"
-" (let ((midpoint (average neg-point pos-point)))\n"
-" (if (close-enough? neg-point post-point)\n"
-" midpoint\n"
-" (nif (f midpoint)\n"
-" (search f neg-point midpoint)\n"
-" (midpoint)\n"
-" (search f midpoint pos-point)))))\n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:55
-msgid ""
-"It also avoids `cond`'s extra clunky parentheses for grouping, which is "
-"unnecessary but built-in."
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:57
-msgid ""
-"As a macro, I personally feel it tilts the balance towards expressivenes "
-"despite its extra cognitive load toll."
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:59
-msgid ""
-"[on-lisp]: http://www.paulgraham.com/onlisptext.html [sicp]: "
-"https://mitpress.mit.edu/sites/default/files/sicp/index.html"
-msgstr ""
diff --git a/v2/po/i18n.mappings b/v2/po/i18n.mappings
deleted file mode 100644
index 39a7319..0000000
--- a/v2/po/i18n.mappings
+++ /dev/null
@@ -1,3 +0,0 @@
-[type: text] src/content/en/about.page pt:src/content/pt/sobre.page
-[type: text] src/content/en/pastebin/sicp-exercise-3-19.md pt:src/content/pt/pastebin/exercicios-sicp-e-19.md
-[type: text] src/content/en/til/lisp-three-way-conditional.md pt:src/content/pt/hea/condicional-ternario-lisp.md
diff --git a/v2/po/pt.po b/v2/po/pt.po
deleted file mode 100644
index a0b99f7..0000000
--- a/v2/po/pt.po
+++ /dev/null
@@ -1,581 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: \n"
-"POT-Creation-Date: 2023-04-10 21:07-0300\n"
-"PO-Revision-Date: \n"
-"Last-Translator: \n"
-"Language-Team: \n"
-"Language: pt\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 2.2.4\n"
-
-#. type: Plain text
-#: src/content/img/alt/atom.en.txt:1
-msgid "three yellow lines representing an Atom feed"
-msgstr ""
-
-#. type: Plain text
-#: src/content/img/alt/envelope.en.txt:1
-msgid "an envelope icon representing an email address"
-msgstr ""
-
-#. type: Plain text
-#: src/content/img/alt/favicon.en.txt:1
-msgid "a crude hand doing a thumbs up"
-msgstr ""
-
-#. type: Plain text
-#: src/content/img/alt/link.en.txt:1
-msgid "two chain rings, representing an anchor to this header"
-msgstr ""
-
-#. type: Plain text
-#: src/content/img/alt/linkto.en.txt:1
-msgid ""
-"a drawing of a box with an arrow going outwards, representing an internal "
-"link"
-msgstr ""
-
-#. type: Plain text
-#: src/content/img/alt/lock.en.txt:1
-msgid "a lock icon representing a GPG public key"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:2
-msgid "export date_fmt='%B %-d, %Y'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:4
-msgid "export site_name=\"EuAndreh's website\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:6
-msgid "export lang='en'"
-msgstr "export lang='pt'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:8
-msgid "export about='About'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:10
-msgid "export about_url_name='about.html'"
-msgstr "export about_url_name='sobre.html'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:12
-msgid "export by_category_url_name='by-category.html'"
-msgstr "export by_category_url_name='por-categoria.html'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:14
-msgid "export homepage_url=\"$(url-for \"$lang/\")\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:16
-msgid "export homepage_url_absolute=\"$(absolute \"$homepage_url\")\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:18
-msgid "export about_url=\"$(url-for \"$lang/$about_url_name\")\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:21
-msgid "export index_article_title='Blog'"
-msgstr "export index_article_title='Blog'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:23
-msgid "export index_recent_article_title='Recent articles'"
-msgstr "export index_recent_article_title='Artigos recentes'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:25
-msgid "export index_category_article_title='Articles by category'"
-msgstr "export index_category_article_title='Artigos por categoria'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:27
-msgid ""
-"export index_article_url=\"$(url-for \"$lang/$(coll2path \"$lang\" "
-"article)\")\""
-msgstr ""
-"export index_article_url=\"$(url-for \"$lang/$(coll2path \"$lang\" "
-"article)\")\""
-
-#. type: Plain text
-#: src/lib/base.en.conf:29
-msgid "export feed_article_title=\"EuAndreh's articles\""
-msgstr "export feed_article_title=\"Artigos do EuAndreh\""
-
-#. type: Plain text
-#: src/lib/base.en.conf:32
-msgid "export index_pastebin_title='Pastebins'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:34
-msgid "export index_recent_pastebin_title='Pastebins listing'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:36
-msgid "export index_category_pastebin_title='Pastebins by category'"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:38
-msgid ""
-"export index_pastebin_url=\"$(url-for \"$lang/$(coll2path \"$lang\" "
-"pastebin)\")\""
-msgstr ""
-"export index_pastebin_url=\"$(url-for \"$lang/$(coll2path \"$lang\" "
-"pastebin)\")\""
-
-#. type: Plain text
-#: src/lib/base.en.conf:40
-msgid "export feed_pastebin_title=\"EuAndreh's pastebins\""
-msgstr ""
-
-#. type: Plain text
-#: src/lib/base.en.conf:43
-msgid "export index_til_title='TIL'"
-msgstr "export index_til_title='HEA'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:45
-msgid "export index_recent_til_title='TIL listing'"
-msgstr "export index_recent_til_title='HEA recentes'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:47
-msgid "export index_category_til_title='TIL by category'"
-msgstr "export index_category_til_title='HEA por categoria'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:49
-msgid ""
-"export index_til_url=\"$(url-for \"$lang/$(coll2path \"$lang\" til)\")\""
-msgstr ""
-"export index_til_url=\"$(url-for \"$lang/$(coll2path \"$lang\" til)\")\""
-
-#. type: Plain text
-#: src/lib/base.en.conf:51
-msgid "export feed_til_title=\"EuAndreh's TIL\""
-msgstr "export feed_til_title=\"HEA do EuAndreh\""
-
-#. type: Plain text
-#: src/lib/base.en.conf:54
-#, fuzzy
-#| msgid "export index_article_title='Blog'"
-msgid "export index_slide_title='Slides'"
-msgstr "export index_article_title='Blog'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:56
-#, fuzzy
-#| msgid "export index_recent_til_title='TIL listing'"
-msgid "export index_recent_slide_title='Slides listing'"
-msgstr "export index_recent_til_title='HEA recentes'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:58
-#, fuzzy
-#| msgid "export index_category_article_title='Articles by category'"
-msgid "export index_category_slide_title='Slides by category'"
-msgstr "export index_category_article_title='Artigos por categoria'"
-
-#. type: Plain text
-#: src/lib/base.en.conf:60
-#, fuzzy
-#| msgid ""
-#| "export index_til_url=\"$(url-for \"$lang/$(coll2path \"$lang\" til)\")\""
-msgid ""
-"export index_slide_url=\"$(url-for \"$lang/$(coll2path \"$lang\" slide)\")\""
-msgstr ""
-"export index_til_url=\"$(url-for \"$lang/$(coll2path \"$lang\" til)\")\""
-
-#. type: Plain text
-#: src/lib/base.en.conf:61
-#, fuzzy
-#| msgid "export feed_article_title=\"EuAndreh's articles\""
-msgid "export feed_slide_title=\"EuAndreh's slides\""
-msgstr "export feed_article_title=\"Artigos do EuAndreh\""
-
-#. type: Plain text
-#: src/lib/commencement.en.conf:2
-msgid "#!/bin/sh"
-msgstr ""
-
-#. type: Plain text
-#: src/lib/commencement.en.conf:4
-msgid "export article_collection_name=''"
-msgstr "export article_collection_name=''"
-
-#. type: Plain text
-#: src/lib/commencement.en.conf:6
-msgid "export pastebin_collection_name='pastebin'"
-msgstr "export pastebin_collection_name='pastebin'"
-
-#. type: Plain text
-#: src/lib/commencement.en.conf:8
-msgid "export til_collection_name='til'"
-msgstr "export til_collection_name='hea'"
-
-#. type: Plain text
-#: src/lib/commencement.en.conf:9
-#, fuzzy
-#| msgid "export til_collection_name='til'"
-msgid "export slide_collection_name='slide'"
-msgstr "export til_collection_name='hea'"
-
-#. type: Content of: <p>
-#: src/lib/comment.en.html:3
-msgid ""
-"<a href=\"$mailto_uri\">Comment</a> and see <a href=\"$discussions_url"
-"\">existing discussions</a> | <a href=\"$sourcecode_url\">view source</a>"
-msgstr ""
-
-#. type: Content of: <p>
-#: src/lib/date.en.html:2
-msgid "Posted on"
-msgstr ""
-
-#. type: Content of: <p><time>
-#: src/lib/date.en.html:2
-msgid "$formatted_date"
-msgstr ""
-
-#. type: Content of: <p>
-#: src/lib/update.en.html:2
-msgid "Updated on"
-msgstr ""
-
-#. type: Content of: <p><time>
-#: src/lib/update.en.html:2
-msgid "$formatted_update"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/about.page:1 src/content/en/about.page:5
-#: src/content/en/pastebin/sicp-exercise-3-19.md:1
-#: src/content/en/pastebin/sicp-exercise-3-19.md:9
-#: src/content/en/til/lisp-three-way-conditional.md:1
-#: src/content/en/til/lisp-three-way-conditional.md:11
-#, no-wrap
-msgid "---\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/about.page:4
-msgid "title: About"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/about.page:7
-msgid "It's all about me, baby!"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:4
-msgid "title: SICP exercise 3.19"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:6
-msgid "date: 2021-09-02"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:8
-msgid "categories: lisp programming-languages"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:12
-msgid "Some content here, before:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:22
-#, no-wrap
-msgid ""
-"```scheme\n"
-"(define (cycle? l)\n"
-" (define (rec l x)\n"
-" (cond\n"
-" ((null? x) false)\n"
-" ((eq? l x) true)\n"
-" (true (rec l (cdr x)))))\n"
-" (rec l (cdr l)))\n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:24
-msgid "Sample interactive session:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:41
-#, no-wrap
-msgid ""
-"```scheme\n"
-"scheme@(guile-user)> (define true #t)\n"
-"scheme@(guile-user)> (define false #f)\n"
-"scheme@(guile-user)>\n"
-"(define (cycle? l)\n"
-" (define (rec l x)\n"
-" (cond\n"
-" ((null? x) false)\n"
-" ((eq? l x) true)\n"
-" (true (rec l (cdr x)))))\n"
-" (rec l (cdr l)))\n"
-"scheme@(guile-user)> (cycle? '(1 2 3))\n"
-"$9 = #f\n"
-"scheme@(guile-user)> (cycle? (make-cycle '(1 2 3)))\n"
-"$10 = #t\n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:43
-msgid "# An h1"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:45
-msgid "a list:"
-msgstr ""
-
-#. type: Bullet: '1. '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:49
-msgid "one"
-msgstr ""
-
-#. type: Bullet: '2. '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:49
-msgid "two"
-msgstr ""
-
-#. type: Bullet: '3. '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:49
-msgid "three"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:51
-msgid "some content."
-msgstr ""
-
-#. type: Bullet: '- '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:55
-msgid "item"
-msgstr ""
-
-#. type: Bullet: '- '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:55
-msgid "another"
-msgstr ""
-
-#. type: Bullet: '- '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:55
-msgid "yet another"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:57
-msgid "## An h2"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:59
-msgid "Xablau:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:62
-msgid "``` xupliu 1"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:65
-msgid "3 4"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:72
-msgid "dez ```"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:74
-msgid "Foi `wikiwiu`."
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:76
-msgid "a very long code block:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:82
-#, no-wrap
-msgid ""
-"```\n"
-"wef\n"
-"wef wef wef wef\n"
-"wef wef wef wef we fwef wef wef wef wef \n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:84
-msgid "Someone said:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:86
-msgid "> Xablau, xupliu."
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:89
-msgid "### A repeated header ### A repeated header"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/pastebin/sicp-exercise-3-19.md:91
-msgid "a big list:"
-msgstr ""
-
-#. type: Bullet: '1. '
-#: src/content/en/pastebin/sicp-exercise-3-19.md:109
-msgid "a"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:4
-msgid "title: Three-way conditional for number signs on Lisp"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:6
-msgid "date: 2021-04-24 3"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:8
-msgid "update: 2021-08-14"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:10
-#, no-wrap
-msgid "categories: lisp scheme common-lisp\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:14
-msgid "A useful macro from Paul Graham's [On Lisp][on-lisp] book:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:23
-#, no-wrap
-msgid ""
-"```lisp\n"
-"(defmacro nif (expr pos zero neg)\n"
-" (let ((g (gensym)))\n"
-" `(let ((,g ,expr))\n"
-" (cond ((plusp ,g) ,pos)\n"
-" ((zerop ,g) ,zero)\n"
-" (t ,neg)))))\n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:25
-msgid ""
-"After I looked at this macro, I started seeing opportunities to using it in "
-"many places, and yet I didn't see anyone else using it."
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:27
-msgid ""
-"The latest example I can think of is section 1.3.3 of [Structure and "
-"Interpretation of Computer Programs][sicp], which I was reading recently:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:40
-#, no-wrap
-msgid ""
-"```scheme\n"
-"(define (search f neg-point pos-point)\n"
-" (let ((midpoint (average neg-point pos-point)))\n"
-" (if (close-enough? neg-point post-point)\n"
-" midpoint\n"
-" (let ((test-value (f midpoint)))\n"
-" (cond ((positive? test-value)\n"
-" (search f neg-point midpoint))\n"
-" ((negative? test-value)\n"
-" (search f midpoint pos-point))\n"
-" (else midpoint))))))\n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:42
-msgid ""
-"Not that the book should introduce such macro this early, but I couldn't "
-"avoid feeling bothered by not using the `nif` macro, which could even remove "
-"the need for the intermediate `test-value` variable:"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:53
-#, no-wrap
-msgid ""
-"```scheme\n"
-"(define (search f neg-point pos-point)\n"
-" (let ((midpoint (average neg-point pos-point)))\n"
-" (if (close-enough? neg-point post-point)\n"
-" midpoint\n"
-" (nif (f midpoint)\n"
-" (search f neg-point midpoint)\n"
-" (midpoint)\n"
-" (search f midpoint pos-point)))))\n"
-"```\n"
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:55
-msgid ""
-"It also avoids `cond`'s extra clunky parentheses for grouping, which is "
-"unnecessary but built-in."
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:57
-msgid ""
-"As a macro, I personally feel it tilts the balance towards expressivenes "
-"despite its extra cognitive load toll."
-msgstr ""
-
-#. type: Plain text
-#: src/content/en/til/lisp-three-way-conditional.md:59
-msgid ""
-"[on-lisp]: http://www.paulgraham.com/onlisptext.html [sicp]: https://"
-"mitpress.mit.edu/sites/default/files/sicp/index.html"
-msgstr ""
diff --git a/v2/src/bin/absolute b/v2/src/bin/absolute
deleted file mode 100755
index f475901..0000000
--- a/v2/src/bin/absolute
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/sh
-set -eu
-
-
-usage() {
- cat <<-'EOF'
- Usage:
- absolute [CONTENT...]
- absolute -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
- Options:
- -h, --help show this message
-
- CONTENT a literal string to be prefixed
-
-
- Add domain prefix to build a full URL. If CONTENT is not given,
- get data from STDIN.
-
- Usually used in conjunction with url-for(1).
-
-
- Examples:
-
- Get the URL for "static/style.css", and make it absolute:
-
- $ url-for 'static/style.css' | absolute
- https://euandre.org/static/style.css
-
-
- Get the absolute variant of a relative URL:
-
- $ absolute "$homepage_url"
- https://euandre.org/pt/
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-
-. src/lib/base.conf
-
-
-prefix() {
- sed "s|^/\?|https://$domain/|"
-}
-
-
-if [ $# = 0 ]; then
- prefix
-else
- for s in "$@"; do
- printf '%s\n' "$s" | prefix
- done
-fi
diff --git a/v2/src/bin/categories b/v2/src/bin/categories
deleted file mode 100755
index de65acb..0000000
--- a/v2/src/bin/categories
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- categories FILENAME
- categories -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
- Options:
- -h, --help show this message
-
- FILENAME the target categories index to be built
-
-
- Generate FILENAME as the indexed list of articles by category.
-
-
- Examples:
-
- Generate the index.categories entry for english pastebins:
-
- $ categories src/en/pastebin/index.categories
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-FILENAME="${1:-}"
-eval "$(assert_arg "$FILENAME" 'FILENAME')"
-DIR="$(dirname "$FILENAME")"
-
-
-mkdir -p "$DIR"
-printf '' > "$FILENAME"
-find "$DIR"/*.categorysort 2>/dev/null |
- awk -F. '{ print $(NF-1) }' |
- sort |
- uniq |
- while read -r category; do
- find "$DIR"/*."$category".categorysort |
- sort -nr |
- xargs cat > "$DIR/$category.category"
- printf '%s\n' "$category" >> "$FILENAME"
- done
diff --git a/v2/src/bin/category b/v2/src/bin/category
deleted file mode 100755
index e3092cc..0000000
--- a/v2/src/bin/category
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- category FILENAME.md > FILENAME.categoryentry
- category -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- FILENAME.md the name of the input file .md file
-
-
- Process the FILENAME, and generate a the derived category files.
-
-
- Examples:
-
- Generate the categories for a pastebin:
-
- $ categories src/a-paste.md > src/a-paste.categoryentry
- EOF
-}
-
-
-for f in "$@"; do
- case "$f" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-FILENAME="${1:-}"
-eval "$(assert_arg "$FILENAME" 'FILENAME.md')"
-
-
-# shellcheck source=/dev/null
-. "${FILENAME%.*}.conf"
-DIR="$(dirname "$FILENAME")"
-
-
-
-echo "${categories:-}" | tr ' ' '\n' | grep . | while read -r category; do
- echo "$FILENAME" > "$DIR/${date_iso:?}.$category.categorysort"
-done
-
-envsubst < src/lib/category.html
diff --git a/v2/src/bin/coll2path b/v2/src/bin/coll2path
deleted file mode 100755
index 79b2f53..0000000
--- a/v2/src/bin/coll2path
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- coll2path LANGUAGE COLLECTION
- coll2path -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- LANGUAGE in which language to list the collections
- names for
- COLLECTION what collection to get the path for
-
-
- Get the path for the COLLECTION, doing the proper translation
- on the way, and checking if is "article".
-
-
- Examples:
-
- Get the path for "TIL" in portuguese:
-
- $ coll2path pt til
- hea/
-
-
- Get the path for "articles" in english
-
- $ collections en articles
-
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-
-LANGUAGE="${1:-}"
-COLLECTION="${2:-}"
-eval "$(assert_arg "$LANGUAGE" 'LANGUAGE')"
-
-# shellcheck source=/dev/null
-. src/lib/commencement."$LANGUAGE".conf
-
-if [ -z "$COLLECTION" ]; then
- echo "${article_collection_name:-}"
-else
- NAME="$(eval "echo \"\$${COLLECTION}_collection_name\"")"
- echo "$NAME${NAME:+/}"
-fi
diff --git a/v2/src/bin/collection-for b/v2/src/bin/collection-for
deleted file mode 100755
index e46f345..0000000
--- a/v2/src/bin/collection-for
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- collection-for FILE
- collection-for -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- FILE the path of the file to get the collection for
-
-
- Say the collection of the given file, using the path of FILE.
-
-
- Examples:
-
- Get "til" for "src/en/til/some-pt.md":
-
- $ collection-for src/en/til/some-pt.md
- til
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-
-FILE="${1:-}"
-eval "$(assert_arg "$FILE" 'FILE')"
-
-
-lang="$(lang-for "$FILE")"
-DIR="$(dirname "$FILE")"
-PAGE="${FILE%.*}.page"
-
-if [ -e "$PAGE" ]; then
- exit 1
-else
- collections | awk -v l="$lang" -v pre="$CONTENT_PREFIX" -v dir="$DIR" '{
- "coll2path " l " " $0 | getline coll_path
- d = pre "/" l "/" coll_path
- sub(/\/$/, "", d)
- if (d == dir) {
- print $0
- }
- }'
-fi
diff --git a/v2/src/bin/collections b/v2/src/bin/collections
deleted file mode 100755
index 0a8e156..0000000
--- a/v2/src/bin/collections
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- collections
- collections -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
-
- List the registered collections to STDOUT.
-
- This is done by emiting the content of the "$COLLECTIONS"
- environment variable.
-
-
- Examples:
-
- Just run it:
-
- $ collections
- til
- pastebin
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- esac
-done
-shift $((OPTIND - 1))
-
-
-echo "$COLLECTIONS" |
- tr ' ' '\n' |
- grep .
diff --git a/v2/src/bin/conf b/v2/src/bin/conf
deleted file mode 100755
index 9fb4664..0000000
--- a/v2/src/bin/conf
+++ /dev/null
@@ -1,228 +0,0 @@
-#!/bin/sh
-set -eu
-
-
-usage() {
- cat <<-'EOF'
- Usage:
- conf [FILENAME]
- conf -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
- Options:
- -h, --help show this message
-
- FILENAME the name of the input file, also to be used as
- URL.
-
-
- Separate the content from the "frontmatter", and emit the
- selected one, given the FILENAME. If FILENAME is not given,
- generate the global config.
-
-
- Examples:
-
- Get the "frontmatter" of src/f.conf:
-
- $ conf src/f.md > src/f.conf
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-
-FILENAME="${1:-}"
-if [ -z "$FILENAME" ]; then
- printf 'export style_url="%s"\n' "$(url-for 'style.css')"
- printf 'export pubkey_url="%s"\n' "$(url-for 'public.asc.txt')"
- printf 'export pubkey_id="%s"\n' "$(
- LANG=C.UTF-8 gpg --list-key "$EMAIL" |
- awk 'NR==2 { print substr($1, length($1) - 15) }' |
- shesc
- )"
-
- for f in "$CONTENT_PREFIX"/img/*.svg; do
- name="$(basename "$f" .svg | sed 's|-|_|g')"
- printf 'export icon_%s_url="%s"\n' "$name" "$(url-for "img/$(basename "$f")")"
- done
- for l in $(langs); do
- for f in "$CONTENT_PREFIX"/img/*.svg; do
- name="$(basename "$f" .svg | sed 's|-|_|g')"
- printf 'export icon_%s_alt="%s"\n' "$name" "$(shesc < "$CONTENT_PREFIX/img/alt/$(basename "$f" .svg).$l.txt" )"
- done > src/lib/generated."$l".conf
- done
- exit
-fi
-
-
-lang="$(lang-for "$FILENAME")"
-export lang
-
-cat src/lib/base.conf src/lib/generated.conf src/lib/generated."$lang".conf |
- tee "$FILENAME".tmp
-DELIMITER=0
-while read -r line; do
- if [ "$line" = '---' ]; then
- DELIMITER=$((DELIMITER + 1))
- continue
- fi
- if [ "$DELIMITER" = 2 ]; then
- break
- fi
- if [ -z "$line" ]; then
- continue
- fi
-
- KEY="$( printf '%s' "$line" | cut -d: -f1)"
- VALUE="$(printf '%s' "$line" | cut -d: -f2- | sed 's|^ ||' | shesc)"
- printf 'export %s="%s"\n' "$KEY" "$VALUE"
-done < "$FILENAME" | tee -a "$FILENAME".tmp
-# shellcheck source=/dev/null
-. "$FILENAME".tmp
-rm -f "$FILENAME".tmp
-
-
-lang="$(lang-for "$FILENAME")"
-export lang
-printf 'export lang="%s"\n' "$lang"
-
-cat src/lib/base."${lang:?}".conf
-# shellcheck source=/dev/null
-. src/lib/base."$lang".conf
-if [ -z "${title:-}" ]; then
- title="${site_name:?}"
- printf 'export title="%s"\n' "$(printf '%s' "$title" | shesc)"
-fi
-
-
-collection="$(collection-for "$FILENAME" ||:)"
-if [ -n "$collection" ]; then
- export collection
- printf 'export collection="%s"\n' "$collection"
-
- coll_path="$(coll2path "$lang" "$collection")"
- feed_title="$(eval "echo \"\$feed_${collection}_title\"" | htmlesc)"
-
- collection_head_html="$(printf ' <link rel="alternate" type="application/atom+xml" href="%s" title="%s" />' \
- "$(url-for "$lang/$coll_path")" \
- "$(htmlesc "$feed_title")"
- )"
- printf 'export collection_head_html="%s"\n' "$(shesc "$collection_head_html")"
-fi
-
-if [ -z "${layout:-}" ]; then
- if [ -z "$collection" ]; then
- layout=page
- else
- layout=post
-
- custom_layout="$(echo "$LAYOUTS" | grep . |
- awk -v coll="$collection" '$1 == coll { print $2 }'
- )"
- if [ -n "$custom_layout" ]; then
- layout="$custom_layout"
- fi
- fi
- export layout
- printf 'export layout="%s"\n' "$layout"
-fi
-
-
-if [ -r "$FILENAME".i18n ]; then
- translations_head="$(awk -F: -v lang="$lang" '$1 != lang{
- printf " <link rel=\"alternate\" type=\"text/html\" href=\"%s\" hreflang=\"%s\" />\n",
- $3, $1
- }' "$FILENAME".i18n)"
- translations_body="$(cat <<-EOF
- <ul class="translation-list">
- $(awk -F: '{
- printf " <li><a href=\"%s\">%s</a></li>\n",
- $3, $1
- }' "$FILENAME".i18n)
- </ul>
- EOF
- )"
- printf 'export translations_head_html="%s"\n' "$(shesc "$translations_head")"
- printf 'export translations_body_html="%s"\n' "$(shesc "$translations_body")"
-fi
-
-if [ -n "${date:-}" ]; then
- date_iso="$(date -ud "${date:?}" -Is)"
- printf 'export date_iso="%s"\n' "$date_iso"
-
- formatted_date="$(LANG="$lang" date -ud "${date:?}" +"${date_fmt:?}")"
- export formatted_date
- printf 'export formatted_date_html="%s"\n' "$(htmlesc "$formatted_date" | shesc)"
- printf 'export date_html="%s"\n' "$(envsubst < src/lib/date."$lang".html | shesc)"
-
- echo "$FILENAME" > "$(dirname "$FILENAME")/$date_iso.sortdata"
-fi
-
-if [ -n "${update:-}" ]; then
- update_iso="$(date -ud "${update:?}" -Is)"
- printf 'export update_iso="%s"\n' "$update_iso"
-
- formatted_update="$(LANG="$lang" date -ud "${update:?}" +"${date_fmt:?}")"
- export formatted_update
- printf 'export update_html="%s"\n' "$(envsubst < src/lib/update."$lang".html | shesc)"
-
- printf 'export update_xml=" <updated>%s</updated>"\n' "$update_iso"
-fi
-
-
-url="$(url-for "$FILENAME")"
-url_part="$(printf '%s' "$url" | sed 's|^/||')"
-title_uri="$(uri "$title")"
-
-printf 'export title_html="%s"\n' "$(printf '%s' "$title" | htmlesc | shesc)"
-printf 'export filename="%s"\n' "$FILENAME"
-printf 'export url_part="%s"\n' "$url_part"
-printf 'export url="%s"\n' "$url"
-printf 'export url_absolute="%s"\n' "$(absolute "$url")"
-printf 'export mailto_uri="%s%s"\n' "${mailto_uri_prefix:?}" "$title_uri"
-printf 'export discussions_url="%s%s"\n' "${discussions_url_prefix:?}" "$title_uri"
-printf 'export sourcecode_url="%s%s"\n' "${sourcecode_url_prefix:?}" "$FILENAME"
-
-
-if [ "${layout:-}" = 'post' ]; then
- export mailto_uri="$mailto_uri_prefix$title_uri"
- export discussions_url="$discussions_url_prefix$title_uri"
- export sourcecode_url="$sourcecode_url_prefix$FILENAME"
- printf 'export comment_html="%s"\n' "$(envsubst < src/lib/comment."$lang".html | shesc)"
-fi
diff --git a/v2/src/bin/dyn-po4a b/v2/src/bin/dyn-po4a
deleted file mode 100755
index 9dde6d1..0000000
--- a/v2/src/bin/dyn-po4a
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- dyn-po4a > po/po4a.cfg
- dyn-po4a -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
-
- Discover translatable files in the repository (via
- git-ls-files(1)) that have '.en.' or '/en/' in their name and
- emit the configuration file to be used with po4a(1).
-
-
- Examples:
-
- Setup i18n on a new repository:
-
- $ mkdir po
- $ touch po/pt.po
- $ touch po/"$(basename "$PWD")".pot
- $ dyn-po4a > po/po4a.cfg
- $ po4a po/po4a.cfg
-
-
- Conditionally update the configuration in a Makefile:
-
- po/po4a.cfg: ALWAYS
- dyn-po4a | ifnew $@
- po4a $@
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-
-guess_type() {
- case "$1" in
- *.md)
- echo text
- ;;
- *.[1-9]*.in)
- echo man
- ;;
- *.html)
- echo xhtml
- ;;
- *)
- echo text
- ;;
- esac
-}
-
-
-cat <<-'EOF'
- [options] --keep 0 --master-charset UTF-8 --localized-charset UTF-8
-
- [po_directory] po
-
-EOF
-
-git ls-files | grep -F '.en.' | while read -r file; do
- TYPE="$(guess_type "$file")"
- # shellcheck disable=2016
- VAR_FILE="$(printf '%s' "$file" | sed 's|\.en\.|.$lang.|')"
- # shellcheck disable=2016
- printf '[type: %s] %s $lang:%s\n' "$TYPE" "$file" "$VAR_FILE"
-done
-
-if [ ! -t 0 ]; then
- cat
-fi
diff --git a/v2/src/bin/eslaide b/v2/src/bin/eslaide
deleted file mode 100755
index 925a3bf..0000000
--- a/v2/src/bin/eslaide
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- eslaide FILENAME.slides > FILENAME.ps
- eslaide -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- FILENAME.slides the name of the input .slides file
-
-
- Process the FILENAME.slides, and generate the derived PostScript
- file.
-
-
- Examples:
-
- Generate the PostScript for a presentation:
-
- $ eslaide src/a-presentation.md > src/a-presentation.ps
- EOF
-}
-
-
-for f in "$@"; do
- case "$f" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-FILENAME="${1:-}"
-eval "$(assert_arg "$FILENAME" 'FILENAME.slides)"
-
-
-# shellcheck source=/dev/null
-. "${FILENAME%.*}.conf"
-DIR="$(dirname "$FILENAME")"
-
-
-
-echo TODO >&2
diff --git a/v2/src/bin/feed b/v2/src/bin/feed
deleted file mode 100755
index 4e0d2f5..0000000
--- a/v2/src/bin/feed
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- feed FILENAME
- feed -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- FILENAME the target feed to be generated
-
-
- Generate FILENAME as an Atom feed. The collection type and
- language are inferred by the name of FILENAME.
-
-
- Examples:
-
- Generate a feed for TILs:
-
- $ feed src/en/til/feed.xml
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-FILENAME="${1:-}"
-eval "$(assert_arg "$FILENAME" 'FILENAME')"
-
-
-. src/lib/base.conf
-# shellcheck source=/dev/null
-. src/lib/base."$(lang-for "$FILENAME")".conf
-
-
-now="$(date -uIs)"
-url_absolute="$(url-for "${FILENAME#"$CONTENT_PREFIX"/}" | absolute)"
-site_name_html="$(htmlesc "${site_name:?}")"
-collection="$(collection-for "$FILENAME")"
-coll_path="$(coll2path "${lang:?}" "$collection")"
-collection_url_absolute="$(url-for "${lang:?}/$coll_path" | absolute)"
-feed_title_html="$(eval "echo \"\$feed_${collection}_title\"" | htmlesc)"
-export now url_absolute site_name_html collection_url_absolute feed_title_html
-
-DIR="$(dirname "$FILENAME")"
-mkdir -p "$DIR"
-{
- envsubst < src/lib/feed.xml
- find "$DIR"/*.sortdata 2>/dev/null |
- sort -nr |
- xargs cat |
- sed 's|\.md$|.xmlentry|' |
- xargs cat
- printf '</feed>\n'
-} > "$FILENAME"
-
-printf '' > "$DIR"/index.extrafeeds
-while read -r category; do
- url_absolute="$(url-for "${DIR#"$CONTENT_PREFIX"/}/feed.$category.xml" | absolute)"
- collection_url_absolute="$(url-for "${DIR#"$CONTENT_PREFIX"/}/${by_category_url_name:?}#$category" | absolute)"
- feed_title_html="$(eval "echo \"\$index_category_${collection}_title\"" | htmlesc)"
- export url_absolute collection_url_absolute feed_title_html
-
- {
- envsubst < src/lib/feed.xml
- < "$DIR/$category.category" \
- sed 's|\.md$|.xmlentry|' |
- xargs cat
- printf '</feed>\n'
- } > "$DIR/feed.$category.xml"
- echo "$DIR/feed.$category.xml" >> "$DIR"/index.extrafeeds
-done < "$DIR"/index.categories
diff --git a/v2/src/bin/html b/v2/src/bin/html
deleted file mode 100755
index 4dabf00..0000000
--- a/v2/src/bin/html
+++ /dev/null
@@ -1,234 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- html FILENAME
- html -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- FILENAME the name of the input file .md file
-
-
- Process the FILENAME, and generate a full HTML page.
-
-
- Examples:
-
- Generate the HTML for a pastebin:
-
- $ html src/a-paste.md > src/a-paste.html
- EOF
-}
-
-
-for f in "$@"; do
- case "$f" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-FILENAME="${1:-}"
-eval "$(assert_arg "$FILENAME" 'FILENAME')"
-
-
-# shellcheck source=/dev/null
-. "${FILENAME%.*}.conf"
-
-#
-# Utility functions
-#
-
-INDENT=' '
-markdown_to_html() {
- md2html | awk -vINDENT="$INDENT" '
- BEGIN {
- in_block = 0
- }
-
- {
- if (in_block == 0) {
- printf "%s", INDENT
- }
- print
- }
-
- /^<\/code><\/pre>$/ {
- in_block = 0
- }
-
- /^<pre><code/ {
- in_block = 1
- }
- '
-}
-
-extract_plaintext_snippets() (
- SNIPPETS="${FILENAME%.*}.snippets"
- printf '' > "$SNIPPETS"
- F="$(mkstemp)"
- cat > "$F"
- IFS=''
- BLOCK_NUMBER=0
- IN_BLOCK=
- while read -r line; do
- if [ "$line" = '</code></pre>' ]; then
- IN_BLOCK=
- fi
-
- if [ -n "$IN_BLOCK" ]; then
- printf '%s\n' "$line" | htmlesc -d >> "$OUT"
- fi
-
- if printf '%s' "$line" | grep -q "^$INDENT<pre><code"; then
- IN_BLOCK=1
- OUT="${FILENAME%.*}.html.$BLOCK_NUMBER.txt"
- BLOCK_NUMBER=$((BLOCK_NUMBER + 1))
- printf '%s\n' "$line" |
- sed "s|^\($INDENT<pre><code.*>\)\(.*\)$|\2|" |
- htmlesc -d > "$OUT"
- printf '%s\n' "$OUT" >> "$SNIPPETS"
- fi
- done < "$F"
-
- BLOCK_NUMBER=0
- while read -r line; do
- printf '%s\n' "$line"
-
- if [ "$line" = '</code></pre>' ]; then
- printf '%s<p class="plaintext-link"><a href="%s">plaintext</a></p>\n' \
- "$INDENT" \
- "$(basename "${url_part:?}").$BLOCK_NUMBER.txt"
- BLOCK_NUMBER=$((BLOCK_NUMBER + 1))
- fi
- done < "$F"
-)
-
-add_line_numbers() {
- awk '
- /^<\/code><\/pre>$/ {
- in_block = 0
- printf "</tbody></table>%s\n", $0
- next
- }
-
- match($0, /^( +<pre><code.*>)(.*)$/, a) {
- printf "%s<table rules=columns class=\"code-block\"><tbody>", a[1]
-
- n = 1
- block_count++
- printf "<tr><td class=\"line-number\"><a id=\"B%s-L%s\" href=\"#B%s-L%s\">%s</a></td><td class=\"code-line\">%s</td></tr>\n", block_count, n, block_count, n, n, a[2]
- in_block = 1
- next
- }
-
- in_block == 1 {
- n++
- printf "<tr><td class=\"line-number\"><a id=\"B%s-L%s\" href=\"#B%s-L%s\">%s</a></td><td class=\"code-line\">%s</td></tr>\n", block_count, n, block_count, n, n, $0
- next
- }
-
- { print }
- '
-}
-
-add_headings_anchors() (
- IFS=''
- while read -r line; do
- if ! printf '%s' "$line" | grep -q "^$INDENT<h[2-6]>"; then
- printf '%s\n' "$line"
- continue
- fi
- LVL="$(printf '%s' "$line" | sed "s|^$INDENT<h\(.\)>.*|\1|")"
- HEADING="$(printf '%s' "$line" | sed "s|^$INDENT<h.>\(.*\)</h.>$|\1|")"
- SLUG="$(slugify "$HEADING")"
- printf '%s<h%s class="header-anchor" id="%s">%s<a href="#%s" aria-hidden="true"><img class="svg-icon" src="%s" /></a></h%s>\n' \
- "$INDENT" \
- "$LVL" \
- "$SLUG" \
- "$HEADING" \
- "$SLUG" \
- "${icon_link_url:?}" \
- "$LVL"
- done
-)
-
-
-warn_duplicate_ids() {
- F="$(mkstemp)"
- tee "$F"
- {
- grep "^$INDENT<h[2-6] class=\"header-anchor\" id=\"" |
- sed "s|^$INDENT<h[2-6] class=\"header-anchor\" id=\"\(.*\)\">.*<a href=.*$|\1|" |
- sort |
- uniq -c |
- awk -v F="$FILENAME" '$1 != 1 {
- printf "WARNING: duplicate header id: %s: %s\n", F, $2
- }'
- } >&2 < "$F"
- rm "$F"
-}
-
-emit_body() {
- < "${FILENAME%.*}.content" \
- markdown_to_html |
- extract_plaintext_snippets |
- add_line_numbers |
- add_headings_anchors |
- warn_duplicate_ids
-}
-
-if [ -r "$FILENAME".prev ]; then
- collection_head_prev_html="$(
- printf ' <link rel="prev" type="text/html" href="%s" />' \
- "$(url-for < "$FILENAME".prev)"
- )"
- export collection_head_prev_html
-fi
-
-if [ -r "$FILENAME".next ]; then
- collection_head_next_html="$(
- printf ' <link rel="next" type="text/html" href="%s" />' \
- "$(url-for < "$FILENAME".next)"
- )"
- export collection_head_next_html
-fi
-
-envsubst < src/lib/preamble.html | sed '/^$/d'
-emit_body | tee "${FILENAME%.*}.htmlbody"
-envsubst < src/lib/postamble.html | sed '/^$/d'
diff --git a/v2/src/bin/i18n b/v2/src/bin/i18n
deleted file mode 100755
index 30404eb..0000000
--- a/v2/src/bin/i18n
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- i18n
- i18n -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
-
- Look at the mappings file provided via STDIN and notify all of
- the files of all of their translations, so that they can include
- it in their header.
-
-
- Examples:
-
- Generate it from "po/i18n.mappings":
-
- $ i18n < po/i18n.mappings
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-
-
-awk '
-{
- from = $3
- idx[from][0] = "en:" from
- for (i = 4; i <= NF; i++) {
- to = $i
- idx[from][length(idx[from])] = to
- }
-}
-
-END {
- for (k1 in idx) {
- split(idx[k1][0], b, /:/)
- base = b[2] ".i18n"
- for (k2 in idx[k1]) {
- split(idx[k1][k2], f, /:/)
- file = f[2] ".i18n"
- if (k2 == 0) {
- for (k3 in idx[k1]) {
- "url-for " f[2] | getline url
- print idx[k1][k3] ":" url > file
- }
- } else {
- ret = system("cp " base " " file)
- if (ret) {
- exit ret
- }
- }
- }
- }
-}
-'
diff --git a/v2/src/bin/index b/v2/src/bin/index
deleted file mode 100755
index 6212544..0000000
--- a/v2/src/bin/index
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- index FILENAME
- index -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
- Options:
- -h, --help show this message
-
- FILENAME the target collection HTML page to be generated
-
-
- Generate FILENAME as a collection index. The collection type
- and language are inferred by the name of FILENAME.
-
-
- Examples:
-
- Generate an index.html entry for english pastebins:
-
- $ index src/en/pastebin/index.html
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-FILENAME="${1:-}"
-eval "$(assert_arg "$FILENAME" 'FILENAME')"
-DIR="$(dirname "$FILENAME")"
-
-
-l="$(lang-for "$FILENAME")"
-. src/lib/base.conf
-. src/lib/generated.conf
-# shellcheck source=/dev/null
-. src/lib/generated."$l".conf
-# shellcheck source=/dev/null
-. src/lib/base."$l".conf
-
-url_absolute="$(url-for "$FILENAME" | absolute)"
-collection="$(collection-for "$FILENAME")"
-feed_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}"/feed.xml)"
-by_category_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}/${by_category_url_name:?}")"
-title_html="$(eval "echo \"\$index_${collection}_title\"" | htmlesc)"
-index_recent_title_html="$(eval "echo \"\$index_recent_${collection}_title\"" | htmlesc)"
-index_category_title_html="$(eval "echo \"\$index_category_${collection}_title\"" | htmlesc)"
-export url_absolute feed_url by_category_url title_html index_recent_title_html \
- index_category_title_html
-
-feed_title="$(eval "echo \"\$feed_${collection}_title\"")"
-collection_head_html="$(printf ' <link rel="alternate" type="application/atom+xml" href="%s" title="%s" />' \
- "$feed_url" \
- "$(htmlesc "$feed_title")")"
-
-translations_head_html="$(langs |
- awk -v lang="${lang:?}" -v coll="$collection" '$0 != lang {
- "coll2path " $0 " " coll | getline coll_path
- "url-for " $0 "/" coll_path | getline url
- printf " <link rel=\"alternate\" type=\"text/html\" href=\"%s\" hreflang=\"%s\" />\n",
- url, $0
- }'
-)"
-translations_body_html="$(cat <<-EOF
- <ul class="translation-list">
- $(langs | awk -v coll="$collection" '{
- "coll2path " $0 " " coll | getline coll_path
- "url-for " $0 "/" coll_path | getline url
- printf " <li><a href=\"%s\">%s</a></li>\n", url, $0
- }')
- </ul>
-EOF
-)"
-export collection_head_html translations_head_html translations_body_html
-
-
-
-mkdir -p "$DIR"
-{
- cat src/lib/preamble.html src/lib/index-preamble.html | envsubst
- find "$DIR"/*.sortdata 2>/dev/null |
- sort -nr |
- xargs cat |
- sed 's|\.md$|.indexentry|' |
- xargs cat
- cat src/lib/index-postamble.html src/lib/postamble.html | envsubst
-} > "$FILENAME"
-
-
-CATEGORY_FILENAME="$CONTENT_PREFIX$by_category_url"
-echo "$CATEGORY_FILENAME" > "${FILENAME%.html}.extrahtml"
-
-url_absolute="$(absolute "$by_category_url")"
-title_html="$(eval "echo \"\$index_category_${collection}_title\"" | htmlesc)"
-export url_absolute title_html
-
-
-DIR="$(dirname "$CATEGORY_FILENAME")"
-mkdir -p "$DIR"
-{
- envsubst < src/lib/preamble.html
- while read -r category; do
- feed_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}/feed.$category.xml")"
- index_recent_title_html="$category"
- export category feed_url index_recent_title_html
-
- envsubst < src/lib/category-header.html
- echo ' <ul>'
- < "$DIR/$category.category" \
- sed 's|\.md$|.categoryentry|' |
- xargs cat
- echo ' </ul>'
- done < "$DIR"/index.categories
- envsubst < src/lib/postamble.html
-} > "$CATEGORY_FILENAME"
diff --git a/v2/src/bin/indexentry b/v2/src/bin/indexentry
deleted file mode 100755
index f971a30..0000000
--- a/v2/src/bin/indexentry
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- indexentry FILENAME
- indexentry -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- FILENAME the name of the input .md file
-
-
- Process FILE, and generate an index collection entry.
-
-
- Examples:
-
- Generate the index entry for a TIL:
-
- $ indexentry src/til/a-til.md > src/til/a-til.indexentry
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-FILENAME="${1:-}"
-eval "$(assert_arg "$FILENAME" 'FILENAME')"
-
-
-# shellcheck source=/dev/null
-. "${FILENAME%.*}.conf"
-
-envsubst < src/lib/entry.html
diff --git a/v2/src/bin/lang-for b/v2/src/bin/lang-for
deleted file mode 100755
index f7c57a9..0000000
--- a/v2/src/bin/lang-for
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- lang-for FILE
- lang-for -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- FILE the path of the file to get the language for
-
-
- Say the language of the given file, using the path of FILE.
-
-
- Examples:
-
- Get "en" for "src/en/some-pt.md":
-
- $ lang-for src/en/some-pt.md
- en
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-
-FILE="${1:-}"
-eval "$(assert_arg "$FILE" 'FILE')"
-
-
-echo "${FILE#"$CONTENT_PREFIX"/}" |
- cut -d/ -f1
diff --git a/v2/src/bin/langs b/v2/src/bin/langs
deleted file mode 100755
index 8e8aa63..0000000
--- a/v2/src/bin/langs
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- langs
- langs -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
-
- List the supported languages, including english, to STDOUT.
-
- This is done in the same way that po4a(1) does it: by listing
- the po/*.po files, and getting the name from it.
-
-
- Examples:
-
- Just run it:
-
- $ langs
- en
- pt
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- esac
-done
-shift $((OPTIND - 1))
-
-
-echo po/en.po po/*.po |
- tr ' ' '\n' |
- sed 's|^po/\(.*\)\.po$|\1|'
diff --git a/v2/src/bin/makemake b/v2/src/bin/makemake
deleted file mode 100755
index 3956844..0000000
--- a/v2/src/bin/makemake
+++ /dev/null
@@ -1,253 +0,0 @@
-#!/bin/sh
-set -eu
-
-
-usage() {
- cat <<-'EOF'
- Usage:
- makemake
- makemake -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
- Options:
- -h, --help show this message
-
-
- Generate make(1) code for later evaluation by make(1). What
- this scripts does is fill the gap where make(1) can't handle
- globs and dynamic dependencies, and uses some ad-hoc scripts
- to generate those.
- EOF
-}
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-
-
-varlist() {
- printf '%s = \\\n' "$1"
- sed \
- -e 's/^/ /' \
- -e 's/$/ \\/'
- printf '\n'
-}
-
-
-EXTENSIONS='
-.conf
-.content
-.html
-.snippets
-.htmlbody
-.mapentry
-'
-
-COLL_EXTENSIONS='
-.categoryentry
-.indexentry
-.xmlentry
-'
-
-page_ext_filter="^($(echo "$COLL_EXTENSIONS" |
- tr ' ' '\n' |
- grep . |
- paste -sd'|'
-))\$"
-
-
-extensions() {
- echo "$EXTENSIONS" "$COLL_EXTENSIONS" "$@" |
- tr ' ' '\n' |
- grep .
-}
-
-
-printf '.POSIX:\n\n\n'
-for lang in $(langs); do
- for c in pages $(collections); do
- if [ "$c" = 'pages' ]; then
- filter="$page_ext_filter"
- src='page'
- coll_path=''
- else
- filter='^$'
- src='md'
- coll_path="$(coll2path "$lang" "$c")"
- fi
-
- mds() {
- git ls-files "$CONTENT_PREFIX/$lang/$coll_path"*."$src" |
- sed 's|\.page$|.md|'
- }
-
- exts() {
- extensions | grep -Ev "$filter"
- }
-
- mds | varlist "$c.$lang.md"
- exts | sed "s|^\(.*\)\$|$c.$lang\1 = \$($c.$lang.md:.md=\1)|"
- exts | sed "s|^\(.*\)\$|\$($c.$lang\1)|" | varlist "$c.$lang"
-
- mds | sed 's/^\(.*\)\.md$/\1.mapentry \1.conf \1.content: \1.md/'
- mds | sed 's/^\(.*\)\.md$/\1.categoryentry \1.indexentry \1.html: \1.conf \1.content/'
- mds | sed 's/^\(.*\)\.md$/\1.snippets \1.htmlbody: \1.html/'
- if [ "$c" = 'pages' ]; then
- mds | sed 's|\.md$|\.page|' | varlist "pages.$lang.page"
- mds | sed "s|^\(.*\).md$|\1.md: \1.page|"
- continue
- fi
-
- mds | sed 's/^\(.*\)\.md$/\1.xmlentry: \1.htmlbody/'
-
- echo "$CONTENT_PREFIX/$lang/${coll_path}index.categories: \$($c.$lang.categoryentry)"
- echo "$CONTENT_PREFIX/$lang/${coll_path}index.html: \$($c.$lang.indexentry) $CONTENT_PREFIX/$lang/${coll_path}index.categories"
- echo "$CONTENT_PREFIX/$lang/${coll_path}feed.xml: \$($c.$lang.xmlentry) $CONTENT_PREFIX/$lang/${coll_path}index.categories"
-
- echo "$CONTENT_PREFIX/$lang/${coll_path}index.extrahtml: $CONTENT_PREFIX/$lang/${coll_path}index.html"
- echo "$CONTENT_PREFIX/$lang/${coll_path}index.extrafeeds: $CONTENT_PREFIX/$lang/${coll_path}feed.xml"
-
- echo "$CONTENT_PREFIX/$lang/${coll_path}index.series: \$($c.$lang.conf)"
- echo "\$($c.$lang.html): $CONTENT_PREFIX/$lang/${coll_path}index.series"
-
- printf '\n\n'
- done
-
- coll_path="$(coll2path "$lang" slide)"
- git ls-files "$CONTENT_PREFIX/$lang/$coll_path"*.slides |
- varlist "slide.$lang.slides"
- git ls-files "$CONTENT_PREFIX/$lang/$coll_path"*.slides |
- sed 's/^\(.*\)\.slides$/\1.pdf: \1.ps/'
- printf '\n\n'
-
- echo "slide.$lang.pdf = \$(slide.$lang.slides:.slides=.pdf)"
- echo "all-generated.$lang.slides = \$(slide.$lang.slides)"
- echo "all-generated.$lang.pdf = \$(slide.$lang.pdf)"
-
- for e in $(extensions); do
- {
- if ! printf '%s\n' "$e" | grep -qE "$page_ext_filter"; then
- echo pages
- fi
- collections
- } |
- sed "s|^\(.*\)\$|\$(\1.$lang$e)|" |
- varlist "all-generated.$lang$e"
- done
-
- collections |
- xargs -I% coll2path "$lang" % |
- sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1index.series|" |
- varlist "all-generated.$lang.series"
-
- collections |
- xargs -I% coll2path "$lang" % |
- sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1index.categories|" |
- varlist "all-generated.$lang.categories"
-
- collections |
- xargs -I% coll2path "$lang" % |
- sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1index.extrahtml|" |
- varlist "all-generated.$lang.extrahtml"
-
- collections |
- xargs -I% coll2path "$lang" % |
- sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1index.extrafeeds|" |
- varlist "all-generated.$lang.extrafeeds"
-
- collections |
- xargs -I% coll2path "$lang" % |
- sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1index.html|" |
- varlist "all-generated.$lang.index"
-
- collections |
- xargs -I% coll2path "$lang" % |
- sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1feed.xml|" |
- varlist "all-generated.$lang.xml"
-
- extensions '.series' '.categories' '.extrahtml' '.extrafeeds' '.index' '.xml' '.pdf' |
- sed "s|^\(.*\)\$|\$(all-generated.$lang\1)|" |
- varlist "all-generated.$lang"
-
-
- printf '\n'
-done
-
-
-git ls-files |
- grep '\.uncolored' |
- varlist 'svgs.uncolored'
-# shellcheck disable=2016
-printf 'svgs = $(svgs.uncolored:.uncolored=)\n\n'
-
-
-{
- git ls-files |
- grep '\.page' |
- sed "s|^$CONTENT_PREFIX\(.*\)\.page|\1.md|"
-
- git ls-files |
- grep '\.uncolored' |
- sed "s|^$CONTENT_PREFIX\(.*\)\.uncolored|\1|"
-} > "$CONTENT_PREFIX"/.gitignore
-
-
-for e in $(extensions '.series' '.categories' '.extrahtml' '.extrafeeds' '.index' '.xml' '.pdf'); do
- langs |
- sed "s|^\(.*\)\$|\$(all-generated.\1$e)|" |
- varlist "all-generated$e"
-done
-
-# shellcheck disable=2016
-langs |
- sed 's|^\(.*\)$|$(pages.\1.md)|' |
- varlist 'pages-mds'
-
-# shellcheck disable=2016
-langs |
- sed 's|^\(.*\)$|$(all-generated.\1)|' |
- varlist 'all-generated'
-
-
-git ls-files src/ |
- grep -v ^"$CONTENT_PREFIX"/ |
- varlist 'non-content'
-
-git ls-files "$CONTENT_PREFIX"/ |
- grep -v '\.md$' |
- grep -v '\.page$' |
- grep -v '\.uncolored$' |
- grep -v '\.slides$' |
- grep -v '\.ps$' |
- varlist 'static-content'
diff --git a/v2/src/bin/mapentry b/v2/src/bin/mapentry
deleted file mode 100755
index 34b6e75..0000000
--- a/v2/src/bin/mapentry
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- mapentry FILENAME
- mapentry -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- FILENAME the name of the input .md file
-
-
- Process FILENAME, and generate a "mapentry": an "<url>...</url>"
- entry to be included into the final sitemap.xml
-
-
- Examples:
-
- Generate the sitemap entry entry for a TIL:
-
- $ xmlentry src/til/a-til.md > src/til/a-til.mapentry
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-FILENAME="${1:-}"
-eval "$(assert_arg "$FILENAME" 'FILENAME')"
-
-
-url_absolute="$(url-for "$FILENAME" | absolute)"
-lastmod="$(git log -1 --format=%ad --date=short "$FILENAME")"
-export url_absolute lastmod
-
-envsubst < src/lib/mapentry.xml
diff --git a/v2/src/bin/security-txt b/v2/src/bin/security-txt
deleted file mode 100755
index 7026969..0000000
--- a/v2/src/bin/security-txt
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- security-txt
- security-txt -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
-
- Generate the RFC 9116 "security.txt" file from data in the
- repository.
-
-
- Examples:
-
- Just run it:
-
- $ security-txt > .well-known/security.txt
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- esac
-done
-shift $((OPTIND - 1))
-
-
-
-EXPIRES="$(
- LANG=C.UTF-8 gpg --list-key "$EMAIL" |
- awk '/^pub/ { print substr($(NF), 1, 10) }'
-)T00:00:00z"
-
-LANGUAGES="$(
- langs |
- sed 's|^|, |' |
- tr -d '\n' |
- sed 's|^, ||'
-)"
-
-
-cat <<-EOF
- Contact: mailto:$EMAIL
- Encryption: $(url-for 'public.asc.txt' | absolute)
- Expires: $EXPIRES
- Preferred-Languages: $LANGUAGES
-EOF
diff --git a/v2/src/bin/series b/v2/src/bin/series
deleted file mode 100755
index 6712368..0000000
--- a/v2/src/bin/series
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- series FILENAME
- series -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
- Options:
- -h, --help show this message
-
- FILENAME the sentinel file to be touched
-
-
- Enumerate and sort all items of a collection type, and notify
- them about their '<link rel="next" ... />' and '<link rel="prev" .../>.
- The collection type and language are inferred by FILENAME.
-
- The "notifying" part is done via a "$TARGET.next" file, that
- is, a ".next" file is created to notify "$TARGET" about which
- item is next to it via the content of the file. The same
- applies for ".prev" files.
-
-
- Examples:
-
- Generate the ".next" and ".prev" files for english pastebins:
-
- $ index src/en/pastebin/index.series
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-
-. src/lib.sh
-
-FILENAME="${1:-}"
-eval "$(assert_arg "$FILENAME" 'FILENAME')"
-DIR="$(dirname "$FILENAME")"
-
-
-find "$DIR"/*.sortdata 2>/dev/null |
- sort -n |
- xargs cat |
- awk '
- BEGIN { split("", items) }
- { items[NR] = $0 }
- END {
- first = 1
- last = length(items)
- for (i in items) {
- item = items[i]
- if (i != first) {
- file = item ".prev"
- prev = items[i-1]
- print prev > file
- }
- if (i != last) {
- file = item ".next"
- nextt = items[i+1]
- print nextt > file
- }
- }
- }
- '
-
-touch "$FILENAME"
diff --git a/v2/src/bin/sitemap b/v2/src/bin/sitemap
deleted file mode 100755
index 09f7eb1..0000000
--- a/v2/src/bin/sitemap
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- sitemap
- sitemap -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
-
- Process all generate "*.mapentry" files, combine them all
- together into the final "sitemap.xml" file.
-
-
- Examples:
-
- Generate the final sitemap.xml:
-
- $ sitemap > src/sitemap.xml
- EOF
-}
-
-
-for f in "$@"; do
- case "$f" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-
-
-printf '<?xml version="1.0" encoding="UTF-8"?>\n'
-printf '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n'
-
-find "$CONTENT_PREFIX"/ -type f -name '*.mapentry' |
- LANG=POSIX.UTF-8 sort |
- xargs cat
-
-printf '</urlset>\n'
diff --git a/v2/src/bin/url-for b/v2/src/bin/url-for
deleted file mode 100755
index e0b1c9d..0000000
--- a/v2/src/bin/url-for
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- url-for [CONTENT...]
- url-for -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
- Options:
- -h, --help show this message
-
- CONTENT literal strings to be transformed into URLs
-
-
- Build an URL without the $domain part, adding the required
- $base_url. If CONTENT is not given, get data from STDIN.
-
-
- Examples:
-
- Get the URL for "en/about.html", when $base_url is "v2":
-
- $ url-for 'about.html'
- /v2/en/about.html
-
-
- Get the URL for "static/favicon.svg", when $base_url is empty:
-
- $ echo 'img/link.svg' | url-for
- /img/link.svg
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-
-. src/lib/base.conf
-
-
-url() {
- sed \
- -e "s|^$CONTENT_PREFIX/||" \
- -e 's|\.md|.html|' \
- -e 's|\.page|.html|' \
- -e 's|^/||' |
- printf '%s%s\n' "${base_url:-/}" "$(cat -)"
-}
-
-if [ $# = 0 ]; then
- url
-else
- for f in "$@"; do
- if [ "$f" = '/' ]; then
- f=''
- fi
- printf '%s\n' "$f" | url
- done
-fi
diff --git a/v2/src/bin/xmlentry b/v2/src/bin/xmlentry
deleted file mode 100755
index f6fb6ea..0000000
--- a/v2/src/bin/xmlentry
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- xmlentry FILENAME
- xmlentry -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- FILENAME the name of the input .md file
-
-
- Process FILE, and generate an Atom feed entry.
-
-
- Examples:
-
- Generate the XML entry for a TIL:
-
- $ xmlentry src/til/a-til.md > src/til/a-til.xml
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-. src/lib.sh
-
-FILENAME="${1:-}"
-eval "$(assert_arg "$FILENAME" 'FILENAME')"
-
-
-# shellcheck source=/dev/null
-. "${FILENAME%.*}.conf"
-
-envsubst < src/lib/entry.xml
-
-head -n1 < "${FILENAME%.*}.htmlbody" | htmlesc
-printf ' </summary>\n'
-printf ' <content type="html" xml:base="%s">\n' "${url:?}"
-
-htmlesc < "${FILENAME%.*}.htmlbody"
-printf ' </content>\n'
-printf ' </entry>\n'
diff --git a/v2/src/content/.well-known/security.txt b/v2/src/content/.well-known/security.txt
deleted file mode 100644
index dd35c49..0000000
--- a/v2/src/content/.well-known/security.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Contact: mailto:eu@euandre.org
-Encryption: https://euandre.org/public.asc.txt
-Expires: 2024-07-15T00:00:00z
-Preferred-Languages: en, pt
diff --git a/v2/src/content/en/about.page b/v2/src/content/en/about.page
deleted file mode 100644
index aac3e67..0000000
--- a/v2/src/content/en/about.page
+++ /dev/null
@@ -1,7 +0,0 @@
----
-
-title: About
-
----
-
-It's all about me, baby!
diff --git a/v2/src/content/en/pastebin/guix-shebang.md b/v2/src/content/en/pastebin/guix-shebang.md
deleted file mode 100644
index 5be9ada..0000000
--- a/v2/src/content/en/pastebin/guix-shebang.md
+++ /dev/null
@@ -1,15 +0,0 @@
----
-
-title: Guix shebang
-
-date: 2020-02-14
-
----
-
-```shell
-#!/usr/bin/env -S guix environment --ad-hoc bash -- bash
-set -Eeuo pipefail
-cd "$(dirname "${BASH_SOURCE[0]}")"
-
-pwd
-```
diff --git a/v2/src/content/en/pastebin/raku-tuple-type-annotation.md b/v2/src/content/en/pastebin/raku-tuple-type-annotation.md
deleted file mode 100644
index 6c13b39..0000000
--- a/v2/src/content/en/pastebin/raku-tuple-type-annotation.md
+++ /dev/null
@@ -1,33 +0,0 @@
----
-
-title: Raku tuple type annotation
-
-date: 2019-12-29
-
-categories: raku programming-languages
-
----
-
-```perl
-# Single Str return value: this works
-sub f1(Str $in --> Str) {
- $in;
-}
-
-# Tuple of Str as return value: this works
-sub f2(Str $in) {
- ($in, $in);
-}
-
-# Tuple of Str as return value with type annotation: this doesn't works
-sub f2(Str $in --> (Str, Str)) {
- ($in, $in);
-}
-```
-
-Error log is:
-
-```perl
-===SORRY!=== Error while compiling /path/to/my/file
-Malformed return value
-```
diff --git a/v2/src/content/en/pastebin/sicp-exercise-3-19.md b/v2/src/content/en/pastebin/sicp-exercise-3-19.md
deleted file mode 100644
index 32f7aa9..0000000
--- a/v2/src/content/en/pastebin/sicp-exercise-3-19.md
+++ /dev/null
@@ -1,109 +0,0 @@
----
-
-title: SICP exercise 3.19
-
-date: 2021-09-02
-
-categories: lisp programming-languages
-
----
-
-Some content here, before:
-
-```scheme
-(define (cycle? l)
- (define (rec l x)
- (cond
- ((null? x) false)
- ((eq? l x) true)
- (true (rec l (cdr x)))))
- (rec l (cdr l)))
-```
-
-Sample interactive session:
-
-```scheme
-scheme@(guile-user)> (define true #t)
-scheme@(guile-user)> (define false #f)
-scheme@(guile-user)>
-(define (cycle? l)
- (define (rec l x)
- (cond
- ((null? x) false)
- ((eq? l x) true)
- (true (rec l (cdr x)))))
- (rec l (cdr l)))
-scheme@(guile-user)> (cycle? '(1 2 3))
-$9 = #f
-scheme@(guile-user)> (cycle? (make-cycle '(1 2 3)))
-$10 = #t
-```
-
-# An h1
-
-a list:
-
-1. one
-2. two
-3. three
-
-some content.
-
-- item
-- another
-- yet another
-
-## An h2
-
-Xablau:
-
-```
-xupliu 1
-
-3
-4
-
-
-
-
-
-dez
-```
-
-Foi `wikiwiu`.
-
-a very long code block:
-
-```
-wef
-wef wef wef wef
-wef wef wef wef we fwef wef wef wef wef
-```
-
-Someone said:
-
-> Xablau, xupliu.
-
-### A repeated header
-### A repeated header
-
-a big list:
-
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
diff --git a/v2/src/content/en/remembering-ann.md b/v2/src/content/en/remembering-ann.md
deleted file mode 100644
index 9013ad4..0000000
--- a/v2/src/content/en/remembering-ann.md
+++ /dev/null
@@ -1,186 +0,0 @@
----
-
-title: ANN: remembering - Add memory to dmenu, fzf and similar tools
-
-date: 2021-01-26
-
-categories: ann
-
----
-
-Today I pushed v0.1.0 of [remembering][remembering], a tool to enhance the interactive usability of menu-like tools, such as [dmenu][dmenu] and [fzf][fzf].
-
-## Previous solution
-
-I previously used [yeganesh][yeganesh] fill this gap, but as I started to rely less on Emacs, I added fzf as my go-to tool for doing fuzzy searching on the terminal.
-But I didn't like that fzf always showed the same order of things, when I would only need 3 or 4 commonly used files.
-
-For those who don't know: yeganesh is a wrapper around dmenu that will remember your most used programs and put them on the beginning of the list of executables.
-This is very convenient for interactive prolonged use, as with time the things you usually want are right at the very beginning.
-
-But now I had this thing, yeganesh, that solved this problem for dmenu, but didn't for fzf.
-
-I initially considered patching yeganesh to support it, but I found it more coupled to dmenu than I would desire.
-I'd rather have something that knows nothing about dmenu, fzf or anything, but enhances tools like those in a useful way.
-
-[remembering]: https://euandreh.xyz/remembering/
-[dmenu]: https://tools.suckless.org/dmenu/
-[fzf]: https://github.com/junegunn/fzf
-[yeganesh]: http://dmwit.com/yeganesh/
-
-## Implementation
-
-Other than being decoupled from dmenu, another improvement I though that could be made on top of yeganesh is the programming language choice.
-Instead of Haskell, I went with POSIX sh.
-Sticking to POSIX sh makes it require less build-time dependencies. There aren't any, actually. Packaging is made much easier due to that.
-
-The good thing is that the program itself is small enough ([119 lines][119-lines] on v0.1.0) that POSIX sh does the job just fine, combined with other POSIX utilities such as [getopts][getopts], [sort][sort] and [awk][awk].
-
-[119-lines]: https://euandre.org/git/remembering/tree/remembering?id=v0.1.0
-[getopts]: http://www.opengroup.org/onlinepubs/9699919799/utilities/getopts.html
-[sort]: http://www.opengroup.org/onlinepubs/9699919799/utilities/sort.html
-[awk]: http://www.opengroup.org/onlinepubs/9699919799/utilities/awk.html
-
-The behaviour is: given a program that will read from STDIN and write a single entry to STDOUT, `remembering` wraps that program, and rearranges STDIN so that previous choices appear at the beginning.
-
-Where you would do:
-
-```shell
-$ seq 5 | fzf
-
- 5
- 4
- 3
- 2
-> 1
- 5/5
->
-```
-
-And every time get the same order of numbers, now you can write:
-
-```shell
-$ seq 5 | remembering -p seq-fzf -c fzf
-
- 5
- 4
- 3
- 2
-> 1
- 5/5
->
-```
-
-On the first run, everything is the same. If you picked 4 on the previous example, the following run would be different:
-
-```shell
-$ seq 5 | remembering -p seq-fzf -c fzf
-
- 5
- 3
- 2
- 1
-> 4
- 5/5
->
-```
-
-As time passes, the list would adjust based on the frequency of your choices.
-
-I aimed for reusability, so that I could wrap diverse commands with `remembering` and it would be able to work. To accomplish that, a "profile" (the `-p something` part) stores data about different runs separately.
-
-I took the idea of building something small with few dependencies to other places too:
-- the manpages are written in troff directly;
-- the tests are just more POSIX sh files;
-- and a POSIX Makefile to `check` and `install`.
-
-I was aware of the value of sticking to coding to standards, but I had past experience mostly with programming language standards, such as ECMAScript, Common Lisp, Scheme, or with IndexedDB or DOM APIs.
-It felt good to rediscover these nice POSIX tools, which makes me remember of a quote by [Henry Spencer][poor-unix]:
-
-> Those who do not understand Unix are condemned to reinvent it, poorly.
-
-[poor-unix]: https://en.wikipedia.org/wiki/Henry_Spencer#cite_note-3
-
-## Usage examples
-
-Here are some functions I wrote myself that you may find useful:
-
-### Run a command with fzf on `$PWD`
-
-```shellcheck
-f() {
- profile="$f-shell-function(pwd | sed -e 's_/_-_g')"
- file="$(git ls-files | \
- remembering -p "$profile" \
- -c "fzf --select-1 --exit -0 --query \"$2\" --preview 'cat {}'")"
- if [ -n "$file" ]; then
- # shellcheck disable=2068
- history -s f $@
- history -s "$1" "$file"
- "$1" "$file"
-fi
-}
-```
-
-This way I can run `f vi` or `f vi config` at the root of a repository, and the list of files will always appear on the most used order.
-Adding `pwd` to the profile allows it to not mix data for different repositories.
-
-### Copy password to clipboard
-
-```shell
-choice="$(find "$HOME/.password-store" -type f | \
- grep -Ev '(.git|.gpg-id)' | \
- sed -e "s|$HOME/.password-store/||" -e 's/\.gpg$//' | \
- remembering -p password-store \
- -c 'dmenu -l 20 -i')"
-
-
-if [ -n "$choice" ]; then
- pass show "$choice" -c
-fi
-```
-
-Adding the above to a file and binding it to a keyboard shortcut, I can access the contents of my [password store][password-store], with the entries ordered by usage.
-
-[password-store]: https://www.passwordstore.org/
-
-### Replacing yeganesh
-
-Where I previously had:
-
-```shell
-exe=$(yeganesh -x) && exec $exe
-```
-
-Now I have:
-
-```shell
-exe=$(dmenu_path | remembering -p dmenu-exec -c dmenu) && exec $exe
-```
-
-This way, the executables appear on order of usage.
-
-If you don't have `dmenu_path`, you can get just the underlying `stest` tool that looks at the executables available in your `$PATH`. Here's a juicy one-liner to do it:
-
-```shell
-$ wget -O- https://dl.suckless.org/tools/dmenu-5.0.tar.gz | \
- tar Ozxf - dmenu-5.0/arg.h dmenu-5.0/stest.c | \
- sed 's|^#include "arg.h"$|// #include "arg.h"|' | \
- cc -xc - -o stest
-```
-
-With the `stest` utility you'll be able to list executables in your `$PATH` and pipe them to dmenu or something else yourself:
-```shell
-$ (IFS=:; ./stest -flx $PATH;) | sort -u | remembering -p another-dmenu-exec -c dmenu | sh
-```
-
-In fact, the code for `dmenu_path` is almost just like that.
-
-## Conclusion
-
-For my personal use, I've [packaged] `remembering` for GNU Guix and Nix. Packaging it to any other distribution should be trivial, or just downloading the tarball and running `[sudo] make install`.
-
-Patches welcome!
-
-[packaged]: https://euandre.org/git/package-repository/
-[nix-file]: https://euandre.org/git/dotfiles/tree/nixos/not-on-nixpkgs/remembering.nix?id=0831444f745cf908e940407c3e00a61f6152961f
diff --git a/v2/src/content/en/slide/local-first.ps b/v2/src/content/en/slide/local-first.ps
deleted file mode 100644
index 44c5858..0000000
--- a/v2/src/content/en/slide/local-first.ps
+++ /dev/null
@@ -1,522 +0,0 @@
-%!PS-Adobe-3.0
-%%DocumentMedia: SLIDE 842 595 0 () ()
-%%EndComments
-%%BeginDefaults
-%%PageMedia: SLIDE
-%%EndDefaults
-<< /PageSize [842 595] /ImagingBBox null >> setpagedevice
-
-/reencode {
- exch
- findfont
- dup length dict
- begin
- {
- 1 index /FID ne
- { def }
- { pop pop }
- ifelse
- } forall
- /Encoding ISOLatin1Encoding def
- currentdict
- end
- definefont pop
-} def
-/Courier /Courier reencode
-/Helvetica /Helvetica reencode
-/Times /Times reencode
-/Times-Italic /Times-Italic reencode
-
-
-/headerheight 77 def
-
-/frontfontsz 60 def
-/authorfontsz 40 def
-/titlefontsz 40 def
-/mainfontsz 30 def
-/codefontsz 18 def
-/tinyfontsz 18 def
-
-/titlefont /Helvetica findfont titlefontsz scalefont def
-/mainfont /Courier findfont mainfontsz scalefont def
-/codefont /Courier findfont codefontsz scalefont def
-/tinyfont /Times findfont tinyfontsz scalefont def
-/frontfont /Helvetica findfont frontfontsz scalefont def
-/authorfont /Times-Italic findfont authorfontsz scalefont def
-/authorfonttwo /Times findfont authorfontsz scalefont def
-
-
-/pagewidth 842 def
-/pageheight 595 def
-/leftmargin 30 def
-/topmargin 595 def
-
-/pad 10 def
-
-/titlefonth titlefontsz pad add def
-/mainfonth mainfontsz pad add def
-/codefonth codefontsz pad add def
-/tinyfonth tinyfontsz pad add def
-/frontfonth frontfontsz pad add def
-/authorfonth authorfontsz pad add def
-
-/headermargin
- pageheight headerheight titlefonth sub 2 div titlefontsz add sub
-def
-/rightmargin pagewidth leftmargin sub def
-/tbtop topmargin def
-/ypos topmargin def
-
-/xcur { currentpoint pop } def
-/ycur { currentpoint exch pop } def
-
-/wordbreak ( ) def
-/linewrap {
- /proc exch def
- /linelength exch def
- /textstring exch def
- /breakwidth wordbreak stringwidth pop def
- /curwidth 0 def
- /lastwordbreak 0 def
- /startchar 0 def
- /restoftext textstring def
- {
- restoftext wordbreak search
- {
- /nextword exch def pop
- /restoftext exch def
- /wordwidth nextword stringwidth pop def
- curwidth wordwidth add linelength gt
- {
- textstring startchar
- lastwordbreak startchar sub
- getinterval proc
- /startchar lastwordbreak def
- /curwidth wordwidth breakwidth add def
- }
- {
- /curwidth curwidth wordwidth add
- breakwidth add def
- } ifelse
- /lastwordbreak lastwordbreak
- nextword length add 1 add def
- }
- {
- pop exit
- } ifelse
- } loop
- /lastchar textstring length def
- textstring startchar lastchar startchar sub
- getinterval proc
-} def
-
-/line {
- 0 0 0 setrgbcolor
- 0.5 setlinewidth
- leftmargin ypos moveto
- rightmargin ypos lineto
- stroke
-} def
-
-/center {
- dup
- /str exch def
- /sw str stringwidth pop def
- /xpos pagewidth sw sub 2 div xcur sub def
- xpos 0 rmoveto
-} def
-
-/objcenter {
- pagewidth exch sub 2 div 0 translate
-} def
-
-/s {
- /tbtop topmargin def
- /ypos topmargin def
- 1 1 1 setrgbcolor
- 0 setlinewidth
- newpath
- 0 pageheight moveto
- pagewidth pageheight lineto
- pagewidth 0 lineto
- 0 0 lineto
- closepath
- fill
- stroke
-} def
-
-/l {
- /h exch def
- /ypos ypos h sub def
- leftmargin ypos moveto
-} def
-
-/title {
- frontfonth l
- frontfont setfont
- 0.5 0.5 0.9 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { frontfonth l center show }
- linewrap
- frontfonth 2 div l
- frontfonth l
-} def
-
-/author {
- authorfont setfont
- 0 0 0 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { authorfonth l center show }
- linewrap
-} def
-
-/authortwo {
- authorfonttwo setfont
- 0 0 0 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { authorfonth l center show }
- linewrap
-} def
-
-/header {
- /ypos pageheight headerheight sub def
- 0 0 0 setrgbcolor
- 0 setlinewidth
- newpath
- 0 pageheight moveto
- pagewidth pageheight lineto
- pagewidth ypos lineto
- 0 ypos lineto
- closepath
- fill
- stroke
- leftmargin headermargin moveto
- titlefont setfont
- 0.5 0.5 0.9 setrgbcolor
- center show
- leftmargin ypos moveto
-} def
-
-/n {
- mainfont setfont
- 0 0 0 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { mainfonth l show }
- linewrap
-} def
-
-/cn {
- codefont setfont
- 0 0 0 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { codefonth l show }
- linewrap
-} def
-
-/tn {
- tinyfont setfont
- 0 0 0 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { tinyfonth l show }
- linewrap
-} def
-
-/is {
- /level1 save def
- /showpage {} def
-} def
-
-/ie {
- level1 restore
-} def
-
-/bs {
- /tbtop ypos def
-} def
-
-/be {
- /tm tbtop pad sub def
- /bm ypos pad sub def
- newpath
- leftmargin 10 sub tm moveto
- rightmargin tm lineto
- rightmargin bm lineto
- leftmargin 10 sub bm lineto
- closepath
- 0 0 0 setrgbcolor
- 0.5 setlinewidth
- stroke
-} def
-( On "local-first") title
-(Beyond the CRDT silver bullet) authortwo
-showpage
-%%Page: 1 1
-s
-( Part 1) header
-( Exposition) title
-showpage
-%%Page: 2 2
-s
-( Target) header
-() n
-() n
-() n
-(- documents) n
-(- files) n
-(- personal data repositories) n
-() n
-() n
-(Not: banking services, e-commerce, social networking, ride-sharing, etc.) n
-showpage
-%%Page: 3 3
-s
-() n
-() n
-() n
-( 7 ideals for local-first software) title
-showpage
-%%Page: 4 4
-s
-() n
-() n
-() n
-( 1 - no spinners: your work at your fingertips) title
-showpage
-%%Page: 5 5
-s
-() n
-() n
-() n
-( 2 - your work is not trapped on one device) title
-showpage
-%%Page: 6 6
-s
-() n
-() n
-() n
-( 3 - the network is optional) title
-showpage
-%%Page: 7 7
-s
-() n
-() n
-() n
-( 4 - seamless collaboration with your colleagues) title
-showpage
-%%Page: 8 8
-s
-() n
-() n
-() n
-( 5 - the long now) title
-showpage
-%%Page: 9 9
-s
-() n
-() n
-() n
-( 6 - security and privacy by default ) title
-showpage
-%%Page: 10 10
-s
-() n
-() n
-() n
-( 7 - you retain ultimate ownership and control) title
-showpage
-%%Page: 11 11
-s
-( Towards a better future) header
-() n
-() n
-() n
-() n
-( CRDTs \(Conflict-free Replicated Data Types\) as a Foundational Technology) authortwo
-showpage
-%%Page: 12 12
-s
-( Use case) header
-() n
-bs
-(# in node A and node B) cn
-(s = "Hello, World") cn
-() cn
-(# in node A) cn
-(s = "Hello, Alice") cn
-() cn
-(# in node B) cn
-(s = "Hello, Bob") cn
-be
-(How to reconcile those?) n
-(- Hello, ABloibce) n
-(- Hello, AliceBob) n
-(- Hello, BobAlice) n
-(- Hello, Alice) n
-(...) n
-showpage
-%%Page: 13 13
-s
-( Existing CRDTs differ) title
-(- performance) n
-(- storage) n
-(- compression) n
-(- metadata overhead) n
-showpage
-%%Page: 14 14
-s
-() n
-() n
-() n
-( Hint towards the "automerge" CRDT) title
-showpage
-%%Page: 15 15
-s
-() n
-() n
-() n
-() n
-() n
-() n
-(show comparison table, page 9) author
-showpage
-%%Page: 16 16
-s
-( Part 2) header
-( Critique) title
-showpage
-%%Page: 17 17
-s
-( Software license) header
-() n
-() n
-() n
-("In our opinion, maintaining control and ownership of data does not mean that the software must necessarily be open source.") author
-showpage
-%%Page: 18 18
-s
-( Example 1 - intentional restriction) header
-() n
-bs
-(#!/bin/sh) cn
-(TODAY="$\(date +%s\)") cn
-(LICENSE_EXPIRATION="$\(date -d 2020-10-27 +%s\)") cn
-(if [ "$TODAY" -ge "$LICENSE_EXPIRATION" ]; then) cn
-( echo 'License expired!') cn
-( exit 1) cn
-(fi) cn
-(echo $\(\(2 + 2\)\)) cn
-be
-() n
-bs
-(# today) cn
-($ ./useful-adder.sh) cn
-(4) cn
-(# tomorrow) cn
-($ ./useful-adder.sh) cn
-(License expired!) cn
-be
-showpage
-%%Page: 19 19
-s
-( Example 2 - unintentional restriction) header
-() n
-bs
-(# today) cn
-($ useful-program) cn
-(# ... useful output ...) cn
-() cn
-(# tomorrow, with more data) cn
-($ useful-program) cn
-(ERROR: Panic! Stack overflow!) cn
-be
-showpage
-%%Page: 20 20
-s
-() n
-() n
-( local-first *requires* free software ) title
-(Otherwise "The Long Now" \(ideal nº5\) is lost) n
-showpage
-%%Page: 21 21
-s
-( Denial of existing solutions) header
-() n
-() n
-("In principle it is possible to collaborate without a repository service, e.g. by sending patch files by email, but the majority of Git users rely on GitHub." ) author
-() n
-(Solution: either GitHub+CRDTs or git send-email ) n
-showpage
-%%Page: 22 22
-s
-( Plain-text formats) header
-() n
-("Git is highly optimized for code and similar line-based text file") author
-() n
-(It even pulls software to the plain text directtion, e.g.:) n
-(- delivery-templates) n
-(- common-core.protocols.config) n
-() n
-(Why not exploit that more?) n
-showpage
-%%Page: 23 23
-s
-( Ditching of web applications) header
-() n
-() n
-("The architecture of web apps remains fundamentally server-centric) author
-() n
-(Disagree. Contrast PouchDB with Android Instant Apps) n
-showpage
-%%Page: 24 24
-s
-( Costs are underrated) header
-() n
-(- storage) n
-(- backups) n
-(- maintenance) n
-() n
-(Example: blog vs vlog) n
-showpage
-%%Page: 25 25
-s
-( Real-time collaboration a bit overrated) header
-() n
-(It is only possible on the presence of reliable, medium-quality network connection) n
-() n
-() n
-("X also works when inside an elevator, subway or plane!") author
-showpage
-%%Page: 26 26
-s
-( On CRDTs and developer experience) header
-() n
-("For an app developer, how does the use of a CRDT-based data layer compare to existing storage layers like a SQL database, a filesystem, or CoreData? Is a distributed system harder to write software for?) author
-() n
-(YES.) authortwo
-() n
-(See "A Note on Distributed Computing") n
-showpage
-%%Page: 27 27
-s
-( Conclusion) header
-() n
-(Why this is a "paper I love": it took offline-first and ran with it.) n
-() n
-(But a pinch of CRDT won't make the world local-first. ) n
-() n
-(The tricky part is the end of the sentence: "in spite of the Cloud".) n
-showpage
-%%Page: 28 28
-s
-( References) header
-() n
-(1. "Local-First Software: You Own Your Data, in spite of the Cloud", by M. Kleppmann, A. Wiggins, P. Van Hardenberg and M. F. McGranaghan) n
-(2. The Morning Paper article) n
-(3. "A Note on Distributed Compiting", by J. Waldo, G. Wyant, A. Wollrath and S. Kendall) n
-(4. these slides: euandre.org/slide/) n
-(5. prose version of this presentation) n
-(6. view source) n
-
-showpage
-
-%%EOF
diff --git a/v2/src/content/en/slide/local-first.slides b/v2/src/content/en/slide/local-first.slides
deleted file mode 100644
index fd83115..0000000
--- a/v2/src/content/en/slide/local-first.slides
+++ /dev/null
@@ -1,204 +0,0 @@
-# On "local-first"
-
-@Beyond the CRDT silver bullet
-
----
-## Part 1
-# Exposition
-
----
-## Target
-...
-- documents
-- files
-- personal data repositories
-..
-Not: banking services, e-commerce, social networking, ride-sharing, etc.
-
----
-...
-# 7 ideals for local-first software
-
----
-...
-# 1 - no spinners: your work at your fingertips
-
----
-...
-# 2 - your work is not trapped on one device
-
----
-...
-# 3 - the network is optional
-
----
-...
-# 4 - seamless collaboration with your colleagues
-
----
-...
-# 5 - the long now
-
----
-...
-# 6 - security and privacy by default
-
----
-...
-# 7 - you retain ultimate ownership and control
-
----
-## Towards a better future
-....
-@ CRDTs (Conflict-free Replicated Data Types) as a Foundational Technology
-
----
-## Use case
-.
- # in node A and node B
- s = "Hello, World"
-
- # in node A
- s = "Hello, Alice"
-
- # in node B
- s = "Hello, Bob"
-
-How to reconcile those?
-- Hello, ABloibce
-- Hello, AliceBob
-- Hello, BobAlice
-- Hello, Alice
-\...
-
----
-# Existing CRDTs differ
-- performance
-- storage
-- compression
-- metadata overhead
-
----
-...
-# Hint towards the "automerge" CRDT
-
----
-......
-@@show comparison table, page 9
-
----
-## Part 2
-# Critique
-
----
-## Software license
-...
-@@"In our opinion, maintaining control and ownership of data does not mean that the software must necessarily be open source."
-
----
-## Example 1 - intentional restriction
-.
- #!/bin/sh
- TODAY="$(date +%s)"
- LICENSE_EXPIRATION="$(date -d 2020-10-27 +%s)"
- if [ "$TODAY" -ge "$LICENSE_EXPIRATION" ]; then
- echo 'License expired!'
- exit 1
- fi
- echo $((2 + 2))
-.
- # today
- $ ./useful-adder.sh
- 4
-
- # tomorrow
- $ ./useful-adder.sh
- License expired!
----
-## Example 2 - unintentional restriction
-.
- # today
- $ useful-program
- # ... useful output ...
-
- # tomorrow, with more data
- $ useful-program
- ERROR: Panic! Stack overflow!
-
----
-..
-# local-first *requires* free software
-
-Otherwise "The Long Now" (ideal nº5) is lost
-
----
-## Denial of existing solutions
-..
-@@"In principle it is possible to collaborate without a repository service, e.g. by sending patch files by email, but the majority of Git users rely on GitHub."
-.
-Solution: either GitHub+CRDTs or git send-email
-
----
-## Plain-text formats
-.
-@@"Git is highly optimized for code and similar line-based text file"
-.
-It even pulls software to the plain text directtion, e.g.:
-- delivery-templates
-- common-core.protocols.config
-.
-Why not exploit that more?
-
----
-## Ditching of web applications
-..
-@@"The architecture of web apps remains fundamentally server-centric
-.
-% FIXME: links
-Disagree. Contrast PouchDB with Android Instant Apps
-
----
-## Costs are underrated
-.
-- storage
-- backups
-- maintenance
-.
-Example: blog vs vlog
-
----
-## Real-time collaboration a bit overrated
-.
-It is only possible on the presence of reliable, medium-quality network connection
-..
-@@"X also works when inside an elevator, subway or plane!"
-
----
-## On CRDTs and developer experience
-.
-@@"For an app developer, how does the use of a CRDT-based data layer compare to existing storage layers like a SQL database, a filesystem, or CoreData? Is a distributed system harder to write software for?
-.
-@YES.
-.
-% FIXME: link
-See "A Note on Distributed Computing"
-
----
-## Conclusion
-.
-Why this is a "paper I love": it took offline-first and ran with it.
-.
-But a pinch of CRDT won't make the world local-first.
-.
-The tricky part is the end of the sentence: "in spite of the Cloud".
-
----
-## References
-.
-% FIXME: links
-1. "Local-First Software: You Own Your Data, in spite of the Cloud", by M. Kleppmann, A. Wiggins, P. Van Hardenberg and M. F. McGranaghan
-2. The Morning Paper article
-3. "A Note on Distributed Compiting", by J. Waldo, G. Wyant, A. Wollrath and S. Kendall
-4. these slides: euandre.org/slide/
-5. prose version of this presentation
-6. view source
diff --git a/v2/src/content/en/slide/rollouts.ps b/v2/src/content/en/slide/rollouts.ps
deleted file mode 100644
index 0a8b39f..0000000
--- a/v2/src/content/en/slide/rollouts.ps
+++ /dev/null
@@ -1,500 +0,0 @@
-%!PS-Adobe-3.0
-%%DocumentMedia: SLIDE 842 595 0 () ()
-%%EndComments
-%%BeginDefaults
-%%PageMedia: SLIDE
-%%EndDefaults
-<< /PageSize [842 595] /ImagingBBox null >> setpagedevice
-
-/reencode {
- exch
- findfont
- dup length dict
- begin
- {
- 1 index /FID ne
- { def }
- { pop pop }
- ifelse
- } forall
- /Encoding ISOLatin1Encoding def
- currentdict
- end
- definefont pop
-} def
-/Times /Times reencode
-/Courier /Courier reencode
-/Times-Italic /Times-Italic reencode
-/Helvetica /Helvetica reencode
-
-
-/headerheight 75 def
-
-/frontfontsz 60 def
-/authorfontsz 40 def
-/titlefontsz 40 def
-/mainfontsz 30 def
-/codefontsz 18 def
-/tinyfontsz 18 def
-
-/titlefont /Helvetica findfont titlefontsz scalefont def
-/mainfont /Courier findfont mainfontsz scalefont def
-/codefont /Courier findfont codefontsz scalefont def
-/tinyfont /Times findfont tinyfontsz scalefont def
-/frontfont /Helvetica findfont frontfontsz scalefont def
-/authorfont /Times-Italic findfont authorfontsz scalefont def
-/authorfonttwo /Times findfont authorfontsz scalefont def
-
-
-/pagewidth 842 def
-/pageheight 595 def
-/leftmargin 30 def
-/topmargin 595 def
-
-/pad 10 def
-
-/titlefonth titlefontsz pad add def
-/mainfonth mainfontsz pad add def
-/codefonth codefontsz pad add def
-/tinyfonth tinyfontsz pad add def
-/frontfonth frontfontsz pad add def
-/authorfonth authorfontsz pad add def
-
-/headermargin
- pageheight headerheight titlefonth sub 2 div titlefontsz add sub
-def
-/rightmargin pagewidth leftmargin sub def
-/tbtop topmargin def
-/ypos topmargin def
-
-/xcur { currentpoint pop } def
-/ycur { currentpoint exch pop } def
-
-/wordbreak ( ) def
-/linewrap {
- /proc exch def
- /linelength exch def
- /textstring exch def
- /breakwidth wordbreak stringwidth pop def
- /curwidth 0 def
- /lastwordbreak 0 def
- /startchar 0 def
- /restoftext textstring def
- {
- restoftext wordbreak search
- {
- /nextword exch def pop
- /restoftext exch def
- /wordwidth nextword stringwidth pop def
- curwidth wordwidth add linelength gt
- {
- textstring startchar
- lastwordbreak startchar sub
- getinterval proc
- /startchar lastwordbreak def
- /curwidth wordwidth breakwidth add def
- }
- {
- /curwidth curwidth wordwidth add
- breakwidth add def
- } ifelse
- /lastwordbreak lastwordbreak
- nextword length add 1 add def
- }
- {
- pop exit
- } ifelse
- } loop
- /lastchar textstring length def
- textstring startchar lastchar startchar sub
- getinterval proc
-} def
-
-/line {
- 0 0 0 setrgbcolor
- 0.5 setlinewidth
- leftmargin ypos moveto
- rightmargin ypos lineto
- stroke
-} def
-
-/center {
- dup
- /str exch def
- /sw str stringwidth pop def
- /xpos pagewidth sw sub 2 div xcur sub def
- xpos 0 rmoveto
-} def
-
-/objcenter {
- pagewidth exch sub 2 div 0 translate
-} def
-
-/s {
- /tbtop topmargin def
- /ypos topmargin def
- 1 1 1 setrgbcolor
- 0 setlinewidth
- newpath
- 0 pageheight moveto
- pagewidth pageheight lineto
- pagewidth 0 lineto
- 0 0 lineto
- closepath
- fill
- stroke
-} def
-
-/l {
- /h exch def
- /ypos ypos h sub def
- leftmargin ypos moveto
-} def
-
-/title {
- frontfonth l
- frontfont setfont
- 0.5 0.5 0.9 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { frontfonth l center show }
- linewrap
- frontfonth 2 div l
- frontfonth l
-} def
-
-/author {
- authorfont setfont
- 0 0 0 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { authorfonth l center show }
- linewrap
-} def
-
-/authortwo {
- authorfonttwo setfont
- 0 0 0 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { authorfonth l center show }
- linewrap
-} def
-
-/header {
- /ypos pageheight headerheight sub def
- 0 0 0 setrgbcolor
- 0 setlinewidth
- newpath
- 0 pageheight moveto
- pagewidth pageheight lineto
- pagewidth ypos lineto
- 0 ypos lineto
- closepath
- fill
- stroke
- leftmargin headermargin moveto
- titlefont setfont
- 0.5 0.5 0.9 setrgbcolor
- center show
- leftmargin ypos moveto
-} def
-
-/n {
- mainfont setfont
- 0 0 0 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { mainfonth l show }
- linewrap
-} def
-
-/cn {
- codefont setfont
- 0 0 0 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { codefonth l show }
- linewrap
-} def
-
-/tn {
- tinyfont setfont
- 0 0 0 setrgbcolor
- { pagewidth leftmargin 2 mul sub }
- { tinyfonth l show }
- linewrap
-} def
-
-/is {
- /level1 save def
- /showpage {} def
-} def
-
-/ie {
- level1 restore
-} def
-
-/bs {
- /tbtop ypos def
-} def
-
-/be {
- /tm tbtop pad sub def
- /bm ypos pad sub def
- newpath
- leftmargin 10 sub tm moveto
- rightmargin tm lineto
- rightmargin bm lineto
- leftmargin 10 sub bm lineto
- closepath
- 0 0 0 setrgbcolor
- 0.5 setlinewidth
- stroke
-} def
-showpage
-%%Page: 1 1
-s
-( Rollout, feature flag, experiment, operational toggle) title
-(Different use cases for backend, frontend and mobile ) authortwo
-showpage
-%%Page: 2 2
-s
-() n
-() n
-() n
-( "Feature flags" tend to come up when talking about continuous deployment) title
-showpage
-%%Page: 3 3
-s
-() n
-() n
-() n
-() n
-(CI: continuous integration) authortwo
-() n
-(CD: continuous delivery) authortwo
-() n
-(CD: continuous deployment) authortwo
-showpage
-%%Page: 4 4
-s
-( Types) header
-() n
-() n
-() n
-(1. rollout) n
-(2. feature flag) n
-(3. experiment) n
-(4. operational toggle) n
-showpage
-%%Page: 5 5
-s
-( Rollout) header
-( For *rolling out* a new version of software) title
-(Short-lived using percentages) n
-(- a new deployment of kubernetes) n
-(- new APK released to the Play Store) n
-showpage
-%%Page: 6 6
-s
-( Feature flag) header
-( For turning a feature *on* or *off* ) title
-(Medium-lived using allow list, A/B test, percentage, app version, etc.) n
-(- :new-chargeback-flow) n
-(- :new-debit-card-activation-screen) n
-showpage
-%%Page: 7 7
-s
-( Experiment) header
-( For analysing behaviour) title
-(Medium-lived using allow list and A/B test) n
-(- :debit-withdrawal-test) n
-showpage
-%%Page: 8 8
-s
-( Operational toggle) header
-( For disabling features in #crash-like situations) title
-(Long-lived using percentage) n
-(- :bank-barcode-payment) n
-(- :savings-bank-barcode-query-provider) n
-showpage
-%%Page: 9 9
-s
-() n
-() n
-(We know know about the types) authortwo
-( But they have different relevance for backend, frontend and mobile) title
-showpage
-%%Page: 10 10
-s
-( backend) header
-() n
-() n
-(1. rollout: k8s blue/green, canary and ~common-rollout~ common-xp) n
-(2. feature flag: ~common-rollout~ common-xp and datasets) n
-(3. experiment: common-xp) n
-(4. operational toggle: ~common-rollout~ common-xp ) n
-showpage
-%%Page: 11 11
-s
-( frontend) header
-() n
-() n
-(1. rollout: CDN and page refreshes) n
-(2. feature flag: percentages and maybe IPs \(no :customer/id on the website\)) n
-(3. experiment: via dynamic backend control) n
-(4. operational toggle: via dynamic backend control ) n
-showpage
-%%Page: 12 12
-s
-( backend) header
-() n
-() n
-(1. rollout: app stores) n
-(2. feature flag: via dynamic backend control) n
-(3. experiment: via dynamic backend control) n
-(4. operational toggle: via dynamic backend control ) n
-showpage
-%%Page: 13 13
-s
-() n
-() n
-(Key differentiator is) authortwo
-( how much *control* we have over the environment) title
-showpage
-%%Page: 14 14
-s
-( backend) header
-( full control) title
-showpage
-%%Page: 15 15
-s
-( frontend) header
-( partial control) title
-(We choose when to make a new version available ) n
-showpage
-%%Page: 16 16
-s
-( mobile) header
-( very limited control) title
-(- app stores can restrict updates \(worse for iOS\)) n
-(- customers still have to download new versions ) n
-showpage
-%%Page: 17 17
-s
-( Costs) title
-(- more complex code) n
-(- compatibility with old app versions) n
-(- nesting is exponential) n
-showpage
-%%Page: 18 18
-s
-( Benefits) title
-(- dynamicity) n
-showpage
-%%Page: 19 19
-s
-( weighting costs × benefits) header
-( The less control we have, the more we value dynamicity ) title
-showpage
-%%Page: 20 20
-s
-( weighting costs × benefits) header
-() n
-() n
-() n
-(- backend: sometimes worth the cost) n
-(- frontend: almost always worth the cost) n
-(- mobile: *always* worth the cost) n
-showpage
-%%Page: 21 21
-s
-() n
-() n
-() n
-( Best practices) title
-showpage
-%%Page: 22 22
-s
-( dynamic content > feature flag) title
-(Always true for mobile, almost always for frontend ) n
-showpage
-%%Page: 23 23
-s
-( Use :include-list for named groups ) title
-(Always true for backend, frontend and mobile ) n
-bs
-({:rules) cn
-( #{{:types :include-list) cn
-( :content {:filename "debit-team-members.txt"}}}}) cn
-be
-showpage
-%%Page: 24 24
-s
-( Always use :app-version) title
-(Only for mobile) n
-bs
-({:rules) cn
-( #{{:types :app-version) cn
-( :content {:min-version #{{:platform :android) cn
-( :code 1000000}) cn
-( {:platform :ios) cn
-( :code 2000000}}}}}}) cn
-be
-showpage
-%%Page: 25 25
-s
-( Extend ~common-rollout~ common-xp if required) title
-(That's how :include-list, :app-version, etc. were born) n
-showpage
-%%Page: 26 26
-s
-( Beware of many nested feature flags) title
-(True for backend, frontend and mobile) n
-showpage
-%%Page: 27 27
-s
-( Don't delete app-facing feature flags) title
-(True for mobile) n
-showpage
-%%Page: 28 28
-s
-() n
-() n
-() n
-( Include a feature flag on the whiteboarding phase) title
-showpage
-%%Page: 29 29
-s
-() n
-() n
-() n
-( Include deleting/retiring the feature flag at the end) title
-showpage
-%%Page: 30 30
-s
-( Avoid renaming a feature flag) title
-(Use :app-version with :min-version instead) n
-showpage
-%%Page: 31 31
-s
-() n
-() n
-() n
-( And most importantly...) title
-showpage
-%%Page: 32 32
-s
-( *Always* rely on a feature flag on the app) title
-(Never do a hotfix, avoid expedited releases at all costs) n
-showpage
-%%Page: 33 33
-s
-( References) header
-() n
-(1. "Feature Toggles \(aka Feature Flags\)", by Pete Hodgson) n
-(2. "Continuous integration vs. delivery vs. deployment", by Sten Pittet) n
-(3. Accelerate, by N. Forsgren, J. Humble and G. Kim) n
-(4. these slides: euandre.org/slide/) n
-(5. prose version of this presentation) n
-(6. view source) n
-
-showpage
-
-%%EOF
diff --git a/v2/src/content/en/slide/rollouts.slides b/v2/src/content/en/slide/rollouts.slides
deleted file mode 100644
index aed745e..0000000
--- a/v2/src/content/en/slide/rollouts.slides
+++ /dev/null
@@ -1,208 +0,0 @@
----
-# Rollout, feature flag, experiment, operational toggle
-
-@Different use cases for backend, frontend and mobile
-
----
-...
-# "Feature flags" tend to come up when talking about continuous deployment
-
----
-....
-@CI: continuous integration
-.
-@CD: continuous delivery
-.
-@CD: continuous deployment
-
----
-## Types
-...
-1. rollout
-2. feature flag
-3. experiment
-4. operational toggle
-
-% {favicon.svg}
----
-## Rollout
-
-# For *rolling out* a new version of software
-
-Short-lived using percentages
-
-% FIXME: links
-- a new deployment of kubernetes
-- new APK released to the Play Store
-
----
-## Feature flag
-
-# For turning a feature *on* or *off*
-
-Medium-lived using allow list, A/B test, percentage, app version, etc.
-
-- :new-chargeback-flow
-- :new-debit-card-activation-screen
-
----
-## Experiment
-
-# For analysing behaviour
-
-Medium-lived using allow list and A/B test
-
-- :debit-withdrawal-test
-
----
-## Operational toggle
-
-# For disabling features in #crash-like situations
-
-Long-lived using percentage
-
-- :bank-barcode-payment
-- :savings-bank-barcode-query-provider
-
----
-..
-@We know know about the types
-# But they have different relevance for backend, frontend and mobile
-
----
-## backend
-..
-1. rollout: k8s blue/green, canary and ~common-rollout~ common-xp
-2. feature flag: ~common-rollout~ common-xp and datasets
-3. experiment: common-xp
-4. operational toggle: ~common-rollout~ common-xp
-
----
-## frontend
-..
-1. rollout: CDN and page refreshes
-2. feature flag: percentages and maybe IPs (no :customer/id on the website)
-3. experiment: via dynamic backend control
-4. operational toggle: via dynamic backend control
-
----
-## backend
-..
-1. rollout: app stores
-2. feature flag: via dynamic backend control
-3. experiment: via dynamic backend control
-4. operational toggle: via dynamic backend control
-
----
-..
-@Key differentiator is
-# how much *control* we have over the environment
-
----
-## backend
-# full control
-% FIXME: emoji
-% 🎉
-
----
-## frontend
-# partial control
-We choose when to make a new version available
-
----
-## mobile
-# very limited control
-- app stores can restrict updates (worse for iOS)
-- customers still have to download new versions
-
----
-# Costs
-- more complex code
-- compatibility with old app versions
-- nesting is exponential
-
----
-# Benefits
-- dynamicity
-
----
-## weighting costs × benefits
-# The less control we have, the more we value dynamicity
-
----
-## weighting costs × benefits
-...
-- backend: sometimes worth the cost
-- frontend: almost always worth the cost
-- mobile: *always* worth the cost
-
----
-...
-# Best practices
-
----
-# dynamic content > feature flag
-Always true for mobile, almost always for frontend
-
----
-# Use :include-list for named groups
-Always true for backend, frontend and mobile
-
- {:rules
- #{{:types :include-list
- :content {:filename "debit-team-members.txt"}}}}
-
----
-# Always use :app-version
-Only for mobile
-
- {:rules
- #{{:types :app-version
- :content {:min-version #{{:platform :android
- :code 1000000}
- {:platform :ios
- :code 2000000}}}}}}
-
----
-# Extend ~common-rollout~ common-xp if required
-
-That's how :include-list, :app-version, etc. were born
-
----
-# Beware of many nested feature flags
-True for backend, frontend and mobile
-
----
-# Don't delete app-facing feature flags
-True for mobile
-
----
-...
-# Include a feature flag on the whiteboarding phase
-
----
-...
-# Include deleting/retiring the feature flag at the end
-
----
-# Avoid renaming a feature flag
-Use :app-version with :min-version instead
-
----
-...
-# And most importantly...
-
----
-# *Always* rely on a feature flag on the app
-Never do a hotfix, avoid expedited releases at all costs
-
----
-## References
-.
-% FIXME: links
-1. "Feature Toggles (aka Feature Flags)", by Pete Hodgson
-2. "Continuous integration vs. delivery vs. deployment", by Sten Pittet
-3. Accelerate, by N. Forsgren, J. Humble and G. Kim
-4. these slides: euandre.org/slide/
-5. prose version of this presentation
-6. view source
diff --git a/v2/src/content/en/til/lisp-three-way-conditional.md b/v2/src/content/en/til/lisp-three-way-conditional.md
deleted file mode 100644
index 20fbd09..0000000
--- a/v2/src/content/en/til/lisp-three-way-conditional.md
+++ /dev/null
@@ -1,59 +0,0 @@
----
-
-title: Three-way conditional for number signs on Lisp
-
-date: 2021-04-24 3
-
-update: 2021-08-14
-
-categories: lisp scheme common-lisp
-
----
-
-A useful macro from Paul Graham's [On Lisp][on-lisp] book:
-
-```lisp
-(defmacro nif (expr pos zero neg)
- (let ((g (gensym)))
- `(let ((,g ,expr))
- (cond ((plusp ,g) ,pos)
- ((zerop ,g) ,zero)
- (t ,neg)))))
-```
-
-After I looked at this macro, I started seeing opportunities to using it in many places, and yet I didn't see anyone else using it.
-
-The latest example I can think of is section 1.3.3 of [Structure and Interpretation of Computer Programs][sicp], which I was reading recently:
-
-```scheme
-(define (search f neg-point pos-point)
- (let ((midpoint (average neg-point pos-point)))
- (if (close-enough? neg-point post-point)
- midpoint
- (let ((test-value (f midpoint)))
- (cond ((positive? test-value)
- (search f neg-point midpoint))
- ((negative? test-value)
- (search f midpoint pos-point))
- (else midpoint))))))
-```
-
-Not that the book should introduce such macro this early, but I couldn't avoid feeling bothered by not using the `nif` macro, which could even remove the need for the intermediate `test-value` variable:
-
-```scheme
-(define (search f neg-point pos-point)
- (let ((midpoint (average neg-point pos-point)))
- (if (close-enough? neg-point post-point)
- midpoint
- (nif (f midpoint)
- (search f neg-point midpoint)
- (midpoint)
- (search f midpoint pos-point)))))
-```
-
-It also avoids `cond`'s extra clunky parentheses for grouping, which is unnecessary but built-in.
-
-As a macro, I personally feel it tilts the balance towards expressivenes despite its extra cognitive load toll.
-
-[on-lisp]: http://www.paulgraham.com/onlisptext.html
-[sicp]: https://mitpress.mit.edu/sites/default/files/sicp/index.html
diff --git a/v2/src/content/favicon.ico b/v2/src/content/favicon.ico
deleted file mode 100644
index 8f2130a..0000000
--- a/v2/src/content/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/v2/src/content/img/alt/atom.en.txt b/v2/src/content/img/alt/atom.en.txt
deleted file mode 100644
index 33bc955..0000000
--- a/v2/src/content/img/alt/atom.en.txt
+++ /dev/null
@@ -1 +0,0 @@
-three yellow lines representing an Atom feed
diff --git a/v2/src/content/img/alt/atom.pt.txt b/v2/src/content/img/alt/atom.pt.txt
deleted file mode 100644
index 33bc955..0000000
--- a/v2/src/content/img/alt/atom.pt.txt
+++ /dev/null
@@ -1 +0,0 @@
-three yellow lines representing an Atom feed
diff --git a/v2/src/content/img/alt/envelope.en.txt b/v2/src/content/img/alt/envelope.en.txt
deleted file mode 100644
index 8b72080..0000000
--- a/v2/src/content/img/alt/envelope.en.txt
+++ /dev/null
@@ -1 +0,0 @@
-an envelope icon representing an email address
diff --git a/v2/src/content/img/alt/envelope.pt.txt b/v2/src/content/img/alt/envelope.pt.txt
deleted file mode 100644
index 8b72080..0000000
--- a/v2/src/content/img/alt/envelope.pt.txt
+++ /dev/null
@@ -1 +0,0 @@
-an envelope icon representing an email address
diff --git a/v2/src/content/img/alt/favicon.en.txt b/v2/src/content/img/alt/favicon.en.txt
deleted file mode 100644
index add8557..0000000
--- a/v2/src/content/img/alt/favicon.en.txt
+++ /dev/null
@@ -1 +0,0 @@
-a crude hand doing a thumbs up
diff --git a/v2/src/content/img/alt/favicon.pt.txt b/v2/src/content/img/alt/favicon.pt.txt
deleted file mode 100644
index add8557..0000000
--- a/v2/src/content/img/alt/favicon.pt.txt
+++ /dev/null
@@ -1 +0,0 @@
-a crude hand doing a thumbs up
diff --git a/v2/src/content/img/alt/link.en.txt b/v2/src/content/img/alt/link.en.txt
deleted file mode 100644
index bbf036f..0000000
--- a/v2/src/content/img/alt/link.en.txt
+++ /dev/null
@@ -1 +0,0 @@
-two chain rings, representing an anchor to this header
diff --git a/v2/src/content/img/alt/link.pt.txt b/v2/src/content/img/alt/link.pt.txt
deleted file mode 100644
index bbf036f..0000000
--- a/v2/src/content/img/alt/link.pt.txt
+++ /dev/null
@@ -1 +0,0 @@
-two chain rings, representing an anchor to this header
diff --git a/v2/src/content/img/alt/linkto.en.txt b/v2/src/content/img/alt/linkto.en.txt
deleted file mode 100644
index a192899..0000000
--- a/v2/src/content/img/alt/linkto.en.txt
+++ /dev/null
@@ -1 +0,0 @@
-a drawing of a box with an arrow going outwards, representing an internal link
diff --git a/v2/src/content/img/alt/linkto.pt.txt b/v2/src/content/img/alt/linkto.pt.txt
deleted file mode 100644
index df3bbf7..0000000
--- a/v2/src/content/img/alt/linkto.pt.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-a drawing of a box with an arrow going outwards, representing an internal
-link
diff --git a/v2/src/content/img/alt/lock.en.txt b/v2/src/content/img/alt/lock.en.txt
deleted file mode 100644
index b809247..0000000
--- a/v2/src/content/img/alt/lock.en.txt
+++ /dev/null
@@ -1 +0,0 @@
-a lock icon representing a GPG public key
diff --git a/v2/src/content/img/alt/lock.pt.txt b/v2/src/content/img/alt/lock.pt.txt
deleted file mode 100644
index b809247..0000000
--- a/v2/src/content/img/alt/lock.pt.txt
+++ /dev/null
@@ -1 +0,0 @@
-a lock icon representing a GPG public key
diff --git a/v2/src/content/img/atom.svg b/v2/src/content/img/atom.svg
deleted file mode 100644
index 37bace2..0000000
--- a/v2/src/content/img/atom.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg width="22" height="22" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
- <path d="M576 1344q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm512 123q2 28-17 48-18 21-47 21h-135q-25 0-43-16.5t-20-41.5q-22-229-184.5-391.5t-391.5-184.5q-25-2-41.5-20t-16.5-43v-135q0-29 21-47 17-17 43-17h5q160 13 306 80.5t259 181.5q114 113 181.5 259t80.5 306zm512 2q2 27-18 47-18 20-46 20h-143q-26 0-44.5-17.5t-19.5-42.5q-12-215-101-408.5t-231.5-336-336-231.5-408.5-102q-25-1-42.5-19.5t-17.5-43.5v-143q0-28 20-46 18-18 44-18h3q262 13 501.5 120t425.5 294q187 186 294 425.5t120 501.5z"
- fill="#EA990E" />
-</svg>
diff --git a/v2/src/content/img/dark-mode.xml b/v2/src/content/img/dark-mode.xml
deleted file mode 100644
index 7c2b572..0000000
--- a/v2/src/content/img/dark-mode.xml
+++ /dev/null
@@ -1,12 +0,0 @@
- <defs>
- <style>
- path {
- fill: black;
- }
- @media(prefers-color-scheme: dark) {
- path {
- fill: white;
- }
- }
- </style>
- </defs>
diff --git a/v2/src/content/img/envelope.svg.uncolored b/v2/src/content/img/envelope.svg.uncolored
deleted file mode 100644
index c2251f4..0000000
--- a/v2/src/content/img/envelope.svg.uncolored
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg width="22" height="22" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
- <path d="M1664 1504v-768q-32 36-69 66-268 206-426 338-51 43-83 67t-86.5 48.5-102.5 24.5h-2q-48 0-102.5-24.5t-86.5-48.5-83-67q-158-132-426-338-37-30-69-66v768q0 13 9.5 22.5t22.5 9.5h1472q13 0 22.5-9.5t9.5-22.5zm0-1051v-24.5l-.5-13-3-12.5-5.5-9-9-7.5-14-2.5h-1472q-13 0-22.5 9.5t-9.5 22.5q0 168 147 284 193 152 401 317 6 5 35 29.5t46 37.5 44.5 31.5 50.5 27.5 43 9h2q20 0 43-9t50.5-27.5 44.5-31.5 46-37.5 35-29.5q208-165 401-317 54-43 100.5-115.5t46.5-131.5zm128-37v1088q0 66-47 113t-113 47h-1472q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1472q66 0 113 47t47 113z" />
-</svg>
diff --git a/v2/src/content/img/favicon.svg.uncolored b/v2/src/content/img/favicon.svg.uncolored
deleted file mode 100644
index ce566b2..0000000
--- a/v2/src/content/img/favicon.svg.uncolored
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
- <path d="M 0 8 L 1 8 L 1 9 L 0 9 L 0 8 Z" />
- <path d="M 0 13 L 1 13 L 1 14 L 0 14 L 0 13 Z" />
- <path d="M 1 8 L 2 8 L 2 9 L 1 9 L 1 8 Z" />
- <path d="M 1 13 L 2 13 L 2 14 L 1 14 L 1 13 Z" />
- <path d="M 2 8 L 3 8 L 3 9 L 2 9 L 2 8 Z" />
- <path d="M 2 13 L 3 13 L 3 14 L 2 14 L 2 13 Z" />
- <path d="M 3 8 L 4 8 L 4 9 L 3 9 L 3 8 Z" />
- <path d="M 3 13 L 4 13 L 4 14 L 3 14 L 3 13 Z" />
- <path d="M 4 7 L 5 7 L 5 8 L 4 8 L 4 7 Z" />
- <path d="M 4 8 L 5 8 L 5 9 L 4 9 L 4 8 Z" />
- <path d="M 4 13 L 5 13 L 5 14 L 4 14 L 4 13 Z" />
- <path d="M 5 6 L 6 6 L 6 7 L 5 7 L 5 6 Z" />
- <path d="M 5 7 L 6 7 L 6 8 L 5 8 L 5 7 Z" />
- <path d="M 5 13 L 6 13 L 6 14 L 5 14 L 5 13 Z" />
- <path d="M 6 5 L 7 5 L 7 6 L 6 6 L 6 5 Z" />
- <path d="M 6 6 L 7 6 L 7 7 L 6 7 L 6 6 Z" />
- <path d="M 6 14 L 7 14 L 7 15 L 6 15 L 6 14 Z" />
- <path d="M 7 1 L 8 1 L 8 2 L 7 2 L 7 1 Z" />
- <path d="M 7 14 L 8 14 L 8 15 L 7 15 L 7 14 Z" />
- <path d="M 7 15 L 8 15 L 8 16 L 7 16 L 7 15 Z" />
- <path d="M 7 2 L 8 2 L 8 3 L 7 3 L 7 2 Z" />
- <path d="M 7 3 L 8 3 L 8 4 L 7 4 L 7 3 Z" />
- <path d="M 7 4 L 8 4 L 8 5 L 7 5 L 7 4 Z" />
- <path d="M 7 5 L 8 5 L 8 6 L 7 6 L 7 5 Z" />
- <path d="M 8 1 L 9 1 L 9 2 L 8 2 L 8 1 Z" />
- <path d="M 8 15 L 9 15 L 9 16 L 8 16 L 8 15 Z" />
- <path d="M 9 1 L 10 1 L 10 2 L 9 2 L 9 1 Z" />
- <path d="M 9 2 L 10 2 L 10 3 L 9 3 L 9 2 Z" />
- <path d="M 9 6 L 10 6 L 10 7 L 9 7 L 9 6 Z" />
- <path d="M 9 15 L 10 15 L 10 16 L 9 16 L 9 15 Z" />
- <path d="M 10 2 L 11 2 L 11 3 L 10 3 L 10 2 Z" />
- <path d="M 10 3 L 11 3 L 11 4 L 10 4 L 10 3 Z" />
- <path d="M 10 4 L 11 4 L 11 5 L 10 5 L 10 4 Z" />
- <path d="M 10 5 L 11 5 L 11 6 L 10 6 L 10 5 Z" />
- <path d="M 10 6 L 11 6 L 11 7 L 10 7 L 10 6 Z" />
- <path d="M 11 6 L 12 6 L 12 7 L 11 7 L 11 6 Z" />
- <path d="M 11 8 L 12 8 L 12 9 L 11 9 L 11 8 Z" />
- <path d="M 10 15 L 11 15 L 11 16 L 10 16 L 10 15 Z" />
- <path d="M 11 10 L 12 10 L 12 11 L 11 11 L 11 10 Z" />
- <path d="M 11 12 L 12 12 L 12 13 L 11 13 L 11 12 Z" />
- <path d="M 11 14 L 12 14 L 12 15 L 11 15 L 11 14 Z" />
- <path d="M 11 15 L 12 15 L 12 16 L 11 16 L 11 15 Z" />
- <path d="M 12 6 L 13 6 L 13 7 L 12 7 L 12 6 Z" />
- <path d="M 12 8 L 13 8 L 13 9 L 12 9 L 12 8 Z" />
- <path d="M 12 10 L 13 10 L 13 11 L 12 11 L 12 10 Z" />
- <path d="M 12 12 L 13 12 L 13 13 L 12 13 L 12 12 Z" />
- <path d="M 12 14 L 13 14 L 13 15 L 12 15 L 12 14 Z" />
- <path d="M 13 6 L 14 6 L 14 7 L 13 7 L 13 6 Z" />
- <path d="M 13 8 L 14 8 L 14 9 L 13 9 L 13 8 Z" />
- <path d="M 13 10 L 14 10 L 14 11 L 13 11 L 13 10 Z" />
- <path d="M 13 12 L 14 12 L 14 13 L 13 13 L 13 12 Z" />
- <path d="M 13 13 L 14 13 L 14 14 L 13 14 L 13 13 Z" />
- <path d="M 13 14 L 14 14 L 14 15 L 13 15 L 13 14 Z" />
- <path d="M 14 7 L 15 7 L 15 8 L 14 8 L 14 7 Z" />
- <path d="M 14 8 L 15 8 L 15 9 L 14 9 L 14 8 Z" />
- <path d="M 14 9 L 15 9 L 15 10 L 14 10 L 14 9 Z" />
- <path d="M 14 10 L 15 10 L 15 11 L 14 11 L 14 10 Z" />
- <path d="M 14 11 L 15 11 L 15 12 L 14 12 L 14 11 Z" />
- <path d="M 14 12 L 15 12 L 15 13 L 14 13 L 14 12 Z" />
-</svg>
diff --git a/v2/src/content/img/link.svg.uncolored b/v2/src/content/img/link.svg.uncolored
deleted file mode 100644
index e5c7050..0000000
--- a/v2/src/content/img/link.svg.uncolored
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg width="22" height="22" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
- <path fill-rule="evenodd"
- d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z" />
-</svg>
diff --git a/v2/src/content/img/linkto.svg.uncolored b/v2/src/content/img/linkto.svg.uncolored
deleted file mode 100644
index d4d9fe1..0000000
--- a/v2/src/content/img/linkto.svg.uncolored
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg width="22" height="22" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
- <path fill-rule="evenodd"
- d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z"/>
- <path fill-rule="evenodd"
- d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z"/>
-</svg>
diff --git a/v2/src/content/img/lock.svg.uncolored b/v2/src/content/img/lock.svg.uncolored
deleted file mode 100644
index 1a4a18e..0000000
--- a/v2/src/content/img/lock.svg.uncolored
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg width="22" height="22" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
- <path d="M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z" />
-</svg>
diff --git a/v2/src/content/pt/hea/condicional-ternario-lisp.md b/v2/src/content/pt/hea/condicional-ternario-lisp.md
deleted file mode 100644
index 6971827..0000000
--- a/v2/src/content/pt/hea/condicional-ternario-lisp.md
+++ /dev/null
@@ -1,65 +0,0 @@
----
-
-title: Three-way conditional for number signs on Lisp
-
-date: 2021-04-24 3
-
-update: 2021-08-14
-
-categories: lisp scheme common-lisp
-
----
-
-A useful macro from Paul Graham's [On Lisp][on-lisp] book:
-
-```lisp
-(defmacro nif (expr pos zero neg)
- (let ((g (gensym)))
- `(let ((,g ,expr))
- (cond ((plusp ,g) ,pos)
- ((zerop ,g) ,zero)
- (t ,neg)))))
-```
-
-After I looked at this macro, I started seeing opportunities to using it in
-many places, and yet I didn't see anyone else using it.
-
-The latest example I can think of is section 1.3.3 of [Structure and
-Interpretation of Computer Programs][sicp], which I was reading recently:
-
-```scheme
-(define (search f neg-point pos-point)
- (let ((midpoint (average neg-point pos-point)))
- (if (close-enough? neg-point post-point)
- midpoint
- (let ((test-value (f midpoint)))
- (cond ((positive? test-value)
- (search f neg-point midpoint))
- ((negative? test-value)
- (search f midpoint pos-point))
- (else midpoint))))))
-```
-
-Not that the book should introduce such macro this early, but I couldn't
-avoid feeling bothered by not using the `nif` macro, which could even remove
-the need for the intermediate `test-value` variable:
-
-```scheme
-(define (search f neg-point pos-point)
- (let ((midpoint (average neg-point pos-point)))
- (if (close-enough? neg-point post-point)
- midpoint
- (nif (f midpoint)
- (search f neg-point midpoint)
- (midpoint)
- (search f midpoint pos-point)))))
-```
-
-It also avoids `cond`'s extra clunky parentheses for grouping, which is
-unnecessary but built-in.
-
-As a macro, I personally feel it tilts the balance towards expressivenes
-despite its extra cognitive load toll.
-
-[on-lisp]: http://www.paulgraham.com/onlisptext.html [sicp]:
-https://mitpress.mit.edu/sites/default/files/sicp/index.html
diff --git a/v2/src/content/pt/pastebin/exercicios-sicp-e-19.md b/v2/src/content/pt/pastebin/exercicios-sicp-e-19.md
deleted file mode 100644
index 89dacfd..0000000
--- a/v2/src/content/pt/pastebin/exercicios-sicp-e-19.md
+++ /dev/null
@@ -1,105 +0,0 @@
----
-
-title: SICP exercise 3.19
-
-date: 2021-09-02
-
-categories: lisp programming-languages
-
----
-
-Some content here, before:
-
-```scheme
-(define (cycle? l)
- (define (rec l x)
- (cond
- ((null? x) false)
- ((eq? l x) true)
- (true (rec l (cdr x)))))
- (rec l (cdr l)))
-```
-
-Sample interactive session:
-
-```scheme
-scheme@(guile-user)> (define true #t)
-scheme@(guile-user)> (define false #f)
-scheme@(guile-user)>
-(define (cycle? l)
- (define (rec l x)
- (cond
- ((null? x) false)
- ((eq? l x) true)
- (true (rec l (cdr x)))))
- (rec l (cdr l)))
-scheme@(guile-user)> (cycle? '(1 2 3))
-$9 = #f
-scheme@(guile-user)> (cycle? (make-cycle '(1 2 3)))
-$10 = #t
-```
-
-# An h1
-
-a list:
-
-1. one
-2. two
-3. three
-
-some content.
-
-- item
-- another
-- yet another
-
-## An h2
-
-Xablau:
-
-``` xupliu 1
-
-3 4
-
-
-
-
-
-dez ```
-
-Foi `wikiwiu`.
-
-a very long code block:
-
-```
-wef
-wef wef wef wef
-wef wef wef wef we fwef wef wef wef wef
-```
-
-Someone said:
-
-> Xablau, xupliu.
-
-### A repeated header ### A repeated header
-
-a big list:
-
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
-1. a
diff --git a/v2/src/content/pt/sobre.page b/v2/src/content/pt/sobre.page
deleted file mode 100644
index aac3e67..0000000
--- a/v2/src/content/pt/sobre.page
+++ /dev/null
@@ -1,7 +0,0 @@
----
-
-title: About
-
----
-
-It's all about me, baby!
diff --git a/v2/src/content/public.asc.txt b/v2/src/content/public.asc.txt
deleted file mode 100644
index 533b54c..0000000
--- a/v2/src/content/public.asc.txt
+++ /dev/null
@@ -1,86 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-
-mQINBFjVvh4BEADIlHUiO6IfkhcNm3J7ilXERgimvKuFNyLIUPZlDcESC1ORrv4y
-9slMDA5uojXctuLRC7nNdynLP+eFFfVUQ+hUXcV24AzyOE0CYo5c4PQA5TLe2AUC
-E9YqqfQF4XuNddY+UpcG47MuVDR+6SHkFkF29ATzpmShJj41lc7a9CdRib+62Wpe
-h7WJOFj/YoxMCBBzic4tiFNgoYobu+lLxyA4T2kCmxEaiZzc6eXBDDgJ0STL4+S8
-avpglaQ+mb5gHbH0yOtuwDG3sWyHKf7LSRVtzWvOqaGmRUmmDsSPjb5vQqvT8EMq
-UfqFFZhScLalthF3PhG0SLXPvoCoRm2aLkN+O3sv057RqaN8E39223mmz6EMXmLk
-H/U5qk2SUl3dx86dIQcB+2WUVu5zuFyfR1g6tD+DcqzxGc9XB7Gz/0TTDf3OimHb
-rp1x5i/04198ocRZT3MzXx8H25tLMS/rHmE87YdgPhMTWheSUevyhoGNHfAOcDwX
-P2oGzELXbLqHxtjENMEw2E996KrSmpcz7WOqIl3PHS1J6eRZoYQesXE+SZTeIiYb
-wD0kkZGYhBZbtLC4VWIuU2T3AL/2hF6aUh1tj1B6vcV0i3HpIHNbvPAF/I0NUhhc
-Gxwwi+ggG/MBHBbxkq7LvG5DfDbav0ZoZaov5dyhtX0CBWjVYATvjRfeAwARAQAB
-tBlFdUFuZHJlaCA8ZXVAZXVhbmRyZS5vcmc+iQI5BBMBCAAjBQJY1b4eAhsDBwsJ
-CAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQgfkOw801YGCWzg//QtDpwgbDY9uC
-Y9a/RgUsbqGAYzSInsbyDCXrAAhWGzkDMLPeFp03Sw9QyCDe0wWu8L2H4hV/FN58
-+4G6353ISwkqsf9R+P9lQs/5dwG7lp5/Gez8bZK3y7zFrdtVwcOCb4De+9fhPsgP
-9pRU8dHpLNo8Ui9IzbiYla7aGxXQdkXU2cvOuEoiuFgvcWU1KWNOWrjImATcC8EF
-8VaEaZYGRXz8lML8KgsAUxrjFkk6tqxrMlOLTjY0BuzcYZpt5XLZ2NuSIDYBoSib
-uBQ1H7DLGa+r0hnNjVEBmMOvFA1hbWa33h1AyYjYhoeVlBYpoHuDosEFqkwZ+otz
-zvImaRAOOFX1IehifTGEFie3imuOHdVuRjXb8SGu8Cgeby0T096A/vf+L1S35nc2
-mdRCUE/SIURW6hfH7uT6KqpokU86vozKmNzIcV3zhAXJ9UYwQqZgg2H3DOcTtZyE
-jVBl2glspoclsfR20T+g+qPqNDAgoDbC71fEAbUTACQau162utpHiabog7e7vyhI
-go5xdjxA8xb3Jtn39pYzbg75ArZqPbxHNZ38m00EBtC5EkD4DFh0cpQ2peuZIh1k
-c5bragCt8o6cV9t4jaq+TtVv4PrFEPqEd+w1FqqwabBq3xSsIgKg2X5rXQkktymB
-un+oN41wofuTZIoGNt8nnGb+skFBxgyJAlYEEwEKAEACGwMHCwkIBwMCAQYVCAIJ
-CgsEFgIDAQIeAQIXgBYhBFva6biy9sa8uw1s5YH5DsPNNWBgBQJi00VjBQkNv+5F
-AAoJEIH5DsPNNWBgy9IP/A8ERtFP3B5BDfIb4BUyw9AvWPAMyNfuKiXVcfrn/CGn
-D+x0dx5doGcIXskTWGEow1/6sFSheYk728wO3pp+DUaDp+2rVwO2AsKBEjBptk9i
-b9YJ4fl4rYtltscLHBGflrQ6C8jIwBqt72Ots+F7IEXy1NcskS/jU6DUzLPDmOog
-doM5IHD/2Fekmq8QVvyryH0nT5YxaJ/qRgOr1NTnnmgTcZHO7l21gJNvWo1QJLME
-lz5xNXRN/rFl5xQ3NxqVh9hwDwp/k5lXW0dxJCpmjbNKG2hNsTYrjTFrG6mSaER5
-0rdzGzQVWavyR+PDY5KRRKupYY4P5luLFy9zCdBr+ZBDTHmLfRcwXubLOSmq+gUO
-8LievpDZITHtgtWGIhWWqA80gOoqWRfAO+cpDpCqWIa+KoZyaxd19WXUqHEBr6Y9
-ZcyCCenM/+WsfmySNqAo6HGVoehewMVSRI6GObS9bdDDJTa3QySQGjdRyAn3uavo
-JwjpXfy09Kirji2x9G85OzOdXDNUrMqu0nB4AFxOU0SLhg0YpRJCig/2uuYRhRMe
-gLFM52AGxk1LfK9Pjrr2V029eRclD8SwC/F51YFP6CKGMyYHJWuaBJL1HXr/fzDD
-sLq4K1TZN/8TpYRA6t8B1mY/57KVsv2naWprmVv7q2eNU17nriLQiYYqfybcVGwn
-uQINBFjVvh4BEADzt2iKa1gSksHtTFkPQ5ULqUF2sHDClr3ykbLq/AxgSCON58eP
-A9SKQy2O+qDpojHAN1UULJgHEn34afzMkBzjxcJXMRgaTV2M+1trjwx/VluD9OKX
-wmnhmSdvCIP7Z0qdhU78maLq10UG1vVwej3kVlxsf4Eu2ZA+NeIr7Tj0DERqEDQo
-DRtNPVEy3h1xoYruy/VjNDi1CI3yFkM6HW1CgRA50rI7GDtvOuitZy+9Lpqs0mWq
-vdApWZxoQwslFcziNd+ZVaQjgO6LSnkDttRkAOblFiD710OQy3/Yo97i7bqsKrnZ
-qQMRUk0n12VXY9I94c7ELfViVqGk123ELtTViiIz5BT5iQRkJj1GiizTgGY6cfsj
-kwWwvabpmWYdyQ85sYoVuNAPz3yDaLdtStWRNHWi4+UHC03J2BiBgIrQbuXoNGuc
-j0b1fsntdntaBoZgFygwW6kXUjHLeEfnrGX3C2X49zg0rBTvEzdZwr2K0xgc2z26
-1EEf5ObmOGRt27K1fwrCxKHbKTscReHv78S4v3uN/9LvHfvIEaBoYHqMCcxy7Aii
-dk+02dNDO/jZDnTAJH2NWhyB+PJvrlnK34zHhUMVH0i5nUjaCDL/n07Vd2sbE5qW
-ivE2MWeayVKRGPci80tEGA1i42FJzGiA1uZrxXNImnsyxQyS8cr9iKoTIQARAQAB
-iQIfBBgBCAAJBQJY1b4eAhsMAAoJEIH5DsPNNWBg+bYQALJyD1nyuz8+vl8rqj7K
-Z9aRSW+XeG/wz6xrAqdY3OVvHwXYw33pgOmhNhfMUgP/Uy5OsxZdjIO7NzyKa2H9
-JoVSsAs/eLQDOQCcwXruBND6zuxt99kZh6o/Xp4lII9vuLafKner+fWluFHhOy/w
-E3Q3VwCbC9npbmzweEl9Q83R7IxbEhtFF5HV0wKVRzW/GX7iWADoHpkAAQ2sUnQp
-HhE1wOrdPm0dD9BEbTRQHekUiIQ8cFoORyWbJBwbflY64ioaFjyM+Ji49pNMykie
-LzQFW1UYyhkXJeTvv93ym4XyMi2mhsOzna7mG1bonKvbKj6qaXb7gFHUXHh/ARuu
-6CNARzBh6BTp+7c1brthGjT/L8CxrAeW2oE5wVIRuk8mdKiFoK3BuXc1P+vsnp36
-ioOQ0y+KPcp+PSbw6oDp7hTHztcW/3EoAgyHneWCmtYYi6RmVptTNpeeyHwqRP/O
-elCN1cw9zopofVQhnxDEUgzVPrWWaE7UR6vrHbzlXvWMeGTYtmdmo/9xkYbQzZW7
-y90QLUGyDwQ+KeCG29W3EhygGy3myVQbRaXywgzzO2YvovjATDa7wZQrXNoVE7J9
-uLonNtRlyRlTAfFP6hCLDXwuE6WRHXhdu7aFKbq0LQGFv5hY4wPUp8vnUtGYT/wo
-qqSkuSYhzNvmuKBIHPs6YD8duQINBGC7n68BEADnUv7iWOejQNa3fZ6v4lkHT6qF
-Rp2+NuzIpFJ2Vy7eP58XZoiz6HJPcCU8Hf95JXwaXEwS4S7mXdw1x60hd8JIe058
-Ek6MZSSVQmlLfocGsAYj1wTrLmnQ8+PV0IeQlNj1aytBI1fL+v3IPt+JdLt6b+g3
-vwcEUU9efzxx2E0KZ5GIpb2meiCQ6ha+tcd7XqegB53eQj/h/coE2zLJodpaJ3xb
-j894pE/OJCNC0+4d0Sv7oHhY7QoLYldTQbSgPyhyfl4iZpJf6OEPZxK2cJaB+cbe
-oBB6aGNyU+CIJToM+uAJJ7H7EpvxfcnfJQ1PuY5szTdvFbW820euiUEKEW69mW4u
-aFNPSc6D4Z8tZ5hXQIqBD40irULhF0CYNkIILmyNV/KJIZ5HkbQ1q+UrCFHJyvuH
-/3aCTjj9OSfE7xHPQ3xd3Xw8vvj0Mjie09xFbbcklBTw5WRzH7cw8c+Q0O69kZZ8
-b+ykcdzWTeZeWNdnzptNqnMjfheig90rUIJ7DN0c+53jCUcGpWJxJhcYF9Uk1RNH
-mSE5+VzK1y+20t0grVFX90nApm4Tl35QPrX7Qxp9C81cWiUB8xCAE6jYrmd4x+P/
-3wSQfc1Xg0Eg3QjJB+6JD7cbyDJpzDR3ja+CLZCAr9I0B4rDKD2d6et/z67iXPnZ
-UWMyZ8RVVZPFbBMOTwARAQABiQI8BBgBCAAmFiEEW9rpuLL2xry7DWzlgfkOw801
-YGAFAmC7n68CGyAFCQPCZwAACgkQgfkOw801YGAS7hAAvAEKKdNj8NK8STfehHIH
-QYxdotNHJc3b0rUa/Kzb9ELTvYgheHH6Dq26c/YSoApJxUrgUVDSJwAJV4T9JqPX
-rfCfhyzfdxocXVAWH01dhWWxCOh/S/gLB/r2CvymbFbNGY6y8vyxG8TahGYZQJEE
-ynUtw+S1sfrbqc8EMGmnw67z/hK3JIcfNrNxvt7FXo1HHcNEMRiah2NtwO9sumEK
-041y7v2efGS4z1i5FIarf/2HtIgIGs77B0G54o4IhgzJzUEYWlHumXKMsETNT3zI
-9uukR16RRkwxqOj6fOD9qNvnM1Tzf9T5DClrS5klz448qlpWWiUDABmyBMDqGKWS
-vr6oi24iemJ4LoAUws1tPCE5WukFKr69UQ9Ab4DuSWwPbQ51RUjMJPeqdV53GnjU
-H6gNBKqxlC0ccuwY3V2kDb8lc46pyN7rqLVZ0IENZ0PFHmfvH+rPkybEjRBqFbhf
-nkDPnHuXSPhsCGPk45OQxnqqCf4QFqyOTG3slc6yk/N4Bz0IVNOFq5sewISGeolb
-4uOF951f5gA2cUy5FXu8Hf8vkdJuB70nHtJLNijloPbAQFq9SuVpvAOlSFLB2wiy
-VgSGXzb4jfIEJidZlsveHDkg/LTzrkHu+f1Qj5thHXN7ARPWvZp1eNFSA6iV7Sho
-LsPdAc9FGcUNEy+/AlLpM1Y=
-=2ZCp
------END PGP PUBLIC KEY BLOCK-----
diff --git a/v2/src/content/style.css b/v2/src/content/style.css
deleted file mode 100644
index a4a635f..0000000
--- a/v2/src/content/style.css
+++ /dev/null
@@ -1,205 +0,0 @@
-/* Colors */
-
-:root {
- --color: black;
- --background-color: white;
- --nav-color: hsl(0, 100%, 25%);
- --fade-color: #555;
- --quote-color: hsl(0, 0%, 41%);
- --code-border-color: hsla(0, 0%, 0%, 0.3);
- --link-color: #0000ee;
- --link-color-visited: #551a8b;
-}
-
-@media(prefers-color-scheme: dark) {
- :root {
- --color: white;
- --background-color: black;
- --fade-color: #aaa;
- --nav-color: hsl(0, 100%, 75%);
- --quote-color: hsl(0, 0%, 59%);
- --code-border-color: hsla(0, 0%, 100%, 0.3);
- --link-color: hsl(211, 100%, 60%);
- --link-color-visited: hsl(242, 100%, 80%);
- }
-}
-
-
-/* General declarations */
-
-body {
- color: var(--color);
- background-color: var(--background-color);
- margin: 0px auto;
- padding: 1%;
- max-width: 750px;
-}
-
-a {
- color: var(--link-color);
-}
-
-a:visited {
- color: var(--link-color-visited);
-}
-
-.svg-icon {
- vertical-align: middle;
-}
-
-
-/* Navigation header */
-
-nav {
- margin-top: 8px;
-}
-
-nav a, nav a:visited {
- color: var(--nav-color);
-}
-
-nav a {
- font-size: 18px;
- margin: 12px;
- text-decoration: none;
-}
-
-nav ul, nav li {
- display: inline;
-}
-
-nav ul.translation-list a, nav ul.translation-list a:visited {
- color: var(--color);
- font-size: 14px;
-}
-
-nav ul.translation-list {
- display: flex;
- justify-content: flex-end;
- font-size: 16px;
- margin: 0;
- padding: 0;
-}
-
-nav ul li a {
- font-size: 18px;
- margin: 6px;
-}
-
-
-/* Article bodies */
-
-.timestamp {
- color: var(--fade-color);
- font-size: 14px;
- font-style: italic;
-}
-
-blockquote {
- font-style: italic;
- color: var(--quote-color);
- padding-left: 10px;
- border-left: 3px solid #ccc;
-}
-
-ul.no-style {
- list-style-type: none;
-}
-
-ul.no-style li {
- margin: 20px 0px;
-}
-
-
-/* Footer */
-
-footer {
- font-size: 14px;
- margin-top: 30px;
- padding: 12px 0px 12px 0px;
-}
-
-footer li {
- list-style-type: none;
- margin-top: 10px;
-}
-
-footer li a {
- margin-left: 5px;
- user-select: none;
-}
-
-/* Code blocks */
-
-/* The "lineno" class is the default generated by Rouge for table-row in code blocks, see:
- https://github.com/rouge-ruby/rouge */
-.line-number, pre.lineno {
- margin-right: 3px;
- padding-right: 3px;
- border-right: 1px solid;
- border-color: var(--code-border-color);
- text-align: right;
- user-select: none;
-}
-
-.code-line {
- padding-left: 8px;
-}
-
-.code-block {
- padding: 6px 4px;
- display: block;
-}
-
-.code-block, pre.highlight {
- border: 1px solid #ccc;
- border-radius: 10px;
-}
-
-pre {
- overflow: auto;
-}
-
-
-/* Code block anchors */
-
-.line-number a, a.code-line-anchor {
- color: var(--color);
- text-decoration: none;
-}
-
-a.code-line-anchor:hover {
- text-decoration: underline;
-}
-
-
-/* Header anchor */
-
-.header-anchor {
- color: var(--color);
- text-decoration: none;
- display: block;
- margin-bottom: 15px;
-}
-
-.header-anchor {
-}
-
-
-.header-anchor img {
- margin-left: 5px;
- visibility: hidden;
-}
-
-.header-anchor:hover img {
- visibility: visible;
-}
-
-
-/* Plaintext code block links */
-
-.plaintext-link {
- margin: auto auto 0 auto;
- text-align: right;
- font-family: monospace;
-}
diff --git a/v2/src/lib.sh b/v2/src/lib.sh
deleted file mode 100644
index 9d183f9..0000000
--- a/v2/src/lib.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-assert_arg() {
- if [ -z "$1" ]; then
- printf 'Missing %s.\n\n' "$2" >&2
- cat <<-'EOF'
- usage >&2
- exit 2
- EOF
- fi
-}
-
-uuid() {
- od -xN20 /dev/urandom |
- head -n1 |
- awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}'
-}
-
-tmpname() {
- echo "${TMPDIR:-/tmp}/uuid-tmpname with spaces.$(uuid)"
-}
-
-mkstemp() {
- name="$(tmpname)"
- touch "$name"
- echo "$name"
-}
-
-mkdtemp() {
- name="$(tmpname)"
- mkdir "$name"
- echo "$name"
-}
diff --git a/v2/src/lib/base.conf b/v2/src/lib/base.conf
deleted file mode 100644
index 72f70b9..0000000
--- a/v2/src/lib/base.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-export domain="$DOMAIN"
-export email="$EMAIL"
-export base_url=''
-export list_addr='~euandreh/public-inbox@lists.sr.ht'
-export mailto_uri_prefix="mailto:$list_addr?Subject=Re%3A%20"
-export discussions_url_prefix="https://lists.sr.ht/~euandreh/public-inbox?search="
-export sourcecode_url_prefix="https://$domain/git/$domain/tree/"
-export author='EuAndreh'
diff --git a/v2/src/lib/base.en.conf b/v2/src/lib/base.en.conf
deleted file mode 100644
index 144f0a0..0000000
--- a/v2/src/lib/base.en.conf
+++ /dev/null
@@ -1,61 +0,0 @@
-export date_fmt='%B %-d, %Y'
-
-export site_name="EuAndreh's website"
-
-export lang='en'
-
-export about='About'
-
-export about_url_name='about.html'
-
-export by_category_url_name='by-category.html'
-
-export homepage_url="$(url-for "$lang/")"
-
-export homepage_url_absolute="$(absolute "$homepage_url")"
-
-export about_url="$(url-for "$lang/$about_url_name")"
-
-
-export index_article_title='Blog'
-
-export index_recent_article_title='Recent articles'
-
-export index_category_article_title='Articles by category'
-
-export index_article_url="$(url-for "$lang/$(coll2path "$lang" article)")"
-
-export feed_article_title="EuAndreh's articles"
-
-
-export index_pastebin_title='Pastebins'
-
-export index_recent_pastebin_title='Pastebins listing'
-
-export index_category_pastebin_title='Pastebins by category'
-
-export index_pastebin_url="$(url-for "$lang/$(coll2path "$lang" pastebin)")"
-
-export feed_pastebin_title="EuAndreh's pastebins"
-
-
-export index_til_title='TIL'
-
-export index_recent_til_title='TIL listing'
-
-export index_category_til_title='TIL by category'
-
-export index_til_url="$(url-for "$lang/$(coll2path "$lang" til)")"
-
-export feed_til_title="EuAndreh's TIL"
-
-
-export index_slide_title='Slides'
-
-export index_recent_slide_title='Slides listing'
-
-export index_category_slide_title='Slides by category'
-
-export index_slide_url="$(url-for "$lang/$(coll2path "$lang" slide)")"
-
-export feed_slide_title="EuAndreh's slides"
diff --git a/v2/src/lib/base.pt.conf b/v2/src/lib/base.pt.conf
deleted file mode 100644
index cb071c8..0000000
--- a/v2/src/lib/base.pt.conf
+++ /dev/null
@@ -1,61 +0,0 @@
-export date_fmt='%B %-d, %Y'
-
-export site_name="EuAndreh's website"
-
-export lang='pt'
-
-export about='About'
-
-export about_url_name='sobre.html'
-
-export by_category_url_name='por-categoria.html'
-
-export homepage_url="$(url-for "$lang/")"
-
-export homepage_url_absolute="$(absolute "$homepage_url")"
-
-export about_url="$(url-for "$lang/$about_url_name")"
-
-
-export index_article_title='Blog'
-
-export index_recent_article_title='Artigos recentes'
-
-export index_category_article_title='Artigos por categoria'
-
-export index_article_url="$(url-for "$lang/$(coll2path "$lang" article)")"
-
-export feed_article_title="Artigos do EuAndreh"
-
-
-export index_pastebin_title='Pastebins'
-
-export index_recent_pastebin_title='Pastebins listing'
-
-export index_category_pastebin_title='Pastebins by category'
-
-export index_pastebin_url="$(url-for "$lang/$(coll2path "$lang" pastebin)")"
-
-export feed_pastebin_title="EuAndreh's pastebins"
-
-
-export index_til_title='HEA'
-
-export index_recent_til_title='HEA recentes'
-
-export index_category_til_title='HEA por categoria'
-
-export index_til_url="$(url-for "$lang/$(coll2path "$lang" til)")"
-
-export feed_til_title="HEA do EuAndreh"
-
-
-export index_slide_title='Slides'
-
-export index_recent_slide_title='Slides listing'
-
-export index_category_slide_title='Slides by category'
-
-export index_slide_url="$(url-for "$lang/$(coll2path "$lang" slide)")"
-
-export feed_slide_title="EuAndreh's slides"
diff --git a/v2/src/lib/category-header.html b/v2/src/lib/category-header.html
deleted file mode 100644
index 03f0949..0000000
--- a/v2/src/lib/category-header.html
+++ /dev/null
@@ -1,6 +0,0 @@
- <h2 id="$category">
- <a href="#$category">$index_recent_title_html</a>
- <a href="$feed_url">
- <img class="svg-icon" src="$icon_atom_url" alt="$icon_atom_alt" />
- </a>
- </h2>
diff --git a/v2/src/lib/category.html b/v2/src/lib/category.html
deleted file mode 100644
index 172829b..0000000
--- a/v2/src/lib/category.html
+++ /dev/null
@@ -1,3 +0,0 @@
- <li>
- <a href="$url">$title_html</a> - $formatted_date_html
- </li>
diff --git a/v2/src/lib/commencement.en.conf b/v2/src/lib/commencement.en.conf
deleted file mode 100644
index 70978a2..0000000
--- a/v2/src/lib/commencement.en.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-export article_collection_name=''
-
-export pastebin_collection_name='pastebin'
-
-export til_collection_name='til'
-
-export slide_collection_name='slide'
diff --git a/v2/src/lib/commencement.pt.conf b/v2/src/lib/commencement.pt.conf
deleted file mode 100644
index ba6693c..0000000
--- a/v2/src/lib/commencement.pt.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-export article_collection_name=''
-
-export pastebin_collection_name='pastebin'
-
-export til_collection_name='hea'
-
-export slide_collection_name='slide'
diff --git a/v2/src/lib/comment.en.html b/v2/src/lib/comment.en.html
deleted file mode 100644
index 6646b14..0000000
--- a/v2/src/lib/comment.en.html
+++ /dev/null
@@ -1,8 +0,0 @@
- <hr />
- <p class="post-footer">
- <a href="$mailto_uri">Comment</a>
- and see
- <a href="$discussions_url">existing discussions</a>
- |
- <a href="$sourcecode_url">view source</a>
- </p>
diff --git a/v2/src/lib/comment.pt.html b/v2/src/lib/comment.pt.html
deleted file mode 100644
index c703847..0000000
--- a/v2/src/lib/comment.pt.html
+++ /dev/null
@@ -1,6 +0,0 @@
- <hr />
- <p class="post-footer">
- <a href="$mailto_uri">Comment</a> and see <a
-href="$discussions_url">existing discussions</a> | <a
-href="$sourcecode_url">view source</a>
- </p>
diff --git a/v2/src/lib/date.en.html b/v2/src/lib/date.en.html
deleted file mode 100644
index 0911bac..0000000
--- a/v2/src/lib/date.en.html
+++ /dev/null
@@ -1,3 +0,0 @@
- <p class="timestamp">
- Posted on <time datetime="$date">$formatted_date</time>
- </p>
diff --git a/v2/src/lib/date.pt.html b/v2/src/lib/date.pt.html
deleted file mode 100644
index 0911bac..0000000
--- a/v2/src/lib/date.pt.html
+++ /dev/null
@@ -1,3 +0,0 @@
- <p class="timestamp">
- Posted on <time datetime="$date">$formatted_date</time>
- </p>
diff --git a/v2/src/lib/entry.html b/v2/src/lib/entry.html
deleted file mode 100644
index cbab9c0..0000000
--- a/v2/src/lib/entry.html
+++ /dev/null
@@ -1,5 +0,0 @@
- <li>
- $formatted_date_html
- <br />
- <a href="$url">$title_html</a>
- </li>
diff --git a/v2/src/lib/entry.xml b/v2/src/lib/entry.xml
deleted file mode 100644
index b43b238..0000000
--- a/v2/src/lib/entry.xml
+++ /dev/null
@@ -1,22 +0,0 @@
- <entry xml:lang="$lang">
- <title type="html">
- $title_html
- </title>
- <link type="text/html" rel="alternative" href="$url_absolute" title="$title_html" />
- <published>
- $date_iso
- </published>
-$update_xml
- <id>
- $url_absolute
- </id>
- <author>
- <name>
- $author
- </name>
- <email>
- $email
- </email>
- </author>
-
- <summary type="html">
diff --git a/v2/src/lib/feed.xml b/v2/src/lib/feed.xml
deleted file mode 100644
index 8e70e98..0000000
--- a/v2/src/lib/feed.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<feed
- xmlns="http://www.w3.org/2005/Atom"
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
- xml:lang="$lang">
- <link href="$url_absolute" rel="self" type="application/atom+xml" />
- <link href="$collection_url_absolute" rel="alternate" type="text/html" hreflang="$lang" />
- <title>$site_name_html</title>
- <subtitle>$feed_title_html</subtitle>
- <id>$url_absolute</id>
- <updated>$now</updated>
-
- <author>
- <name>$author</name>
- <email>$email</email>
- </author>
diff --git a/v2/src/lib/index-postamble.html b/v2/src/lib/index-postamble.html
deleted file mode 100644
index 899c88c..0000000
--- a/v2/src/lib/index-postamble.html
+++ /dev/null
@@ -1,8 +0,0 @@
- </ul>
-
- <h2>
- <a href="$by_category_url">
- $index_category_title_html
- <img class="svg-icon" src="$icon_linkto_url" alt="$icon_linkto_alt" />
- </a>
- </h2>
diff --git a/v2/src/lib/index-preamble.html b/v2/src/lib/index-preamble.html
deleted file mode 100644
index 57563bc..0000000
--- a/v2/src/lib/index-preamble.html
+++ /dev/null
@@ -1,7 +0,0 @@
- <h2>
- $index_recent_title_html
- <a href="$feed_url">
- <img class="svg-icon" src="$icon_atom_url" alt="$icon_atom_alt" />
- </a>
- </h2>
- <ul class="no-style">
diff --git a/v2/src/lib/mapentry.xml b/v2/src/lib/mapentry.xml
deleted file mode 100644
index 5c715c0..0000000
--- a/v2/src/lib/mapentry.xml
+++ /dev/null
@@ -1,5 +0,0 @@
- <url>
- <loc>$url_absolute</loc>
- <lastmod>$lastmod</lastmod>
- <changefreq>monthly</changefreq>
- </url>
diff --git a/v2/src/lib/postamble.html b/v2/src/lib/postamble.html
deleted file mode 100644
index e55666d..0000000
--- a/v2/src/lib/postamble.html
+++ /dev/null
@@ -1,25 +0,0 @@
-$comment_html
- </article>
- </main>
- <footer>
- <hr />
- <ul>
- <li>
- <img class="svg-icon" src="$icon_envelope_url" alt="$icon_envelope_alt" />
- <a href="mailto:$email">$email</a>
- </li>
- <li>
- <img class="svg-icon" src="$icon_lock_url" alt="$icon_lock_alt" />
- <a href="$pubkey_url">$pubkey_id</a>
- </li>
- </ul>
- <p>
- The content for this site is licensed under
- <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>.
- The <a href="https://euandre.org/git/euandre.org">code</a> is
- <a rel="license" href="https://euandre.org/git/euandre.org/tree/COPYING">AGPLv3 or later</a>.
- Patches welcome.
- </p>
- </footer>
- </body>
-</html>
diff --git a/v2/src/lib/preamble.html b/v2/src/lib/preamble.html
deleted file mode 100644
index 17efced..0000000
--- a/v2/src/lib/preamble.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html lang="$lang">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <link rel="stylesheet" type="text/css" href="$style_url" />
- <link rel="icon" type="image/svg+xml" href="$icon_favicon_url" />
- <link rel="canonical" type="text/html" href="$url_absolute" />
-$translations_head_html
-$collection_head_html
-$collection_head_prev_html
-$collection_head_next_html
-
- <title>$title_html</title>
-
- <meta name="author" content="$author" />
- <meta property="og:url" content="$url_absolute" />
- <meta property="og:site_name" content="$site_name" />
- <meta property="og:locale" content="$lang" />
- <meta property="og:title" content="$title_html" />
- </head>
- <body>
- <header>
- <nav>
- <ul class="main-navigation-links">
- <li>
- <a href="$homepage_url">$author</a>
- </li>
- <li>
- <a href="$about_url">$about</a>
- </li>
- </ul>
- <ul class="collections-navigation-links">
- <li>
- <a href="$index_til_url">$index_til_title</a>
- </li>
- <li>
- <a href="$index_pastebin_url">$index_pastebin_title</a>
- </li>
- </ul>
-$translations_body_html
- </nav>
- <hr />
- </header>
- <main>
- <article>
- <h1>
- $title_html
- </h1>
-$date_html
-$update_html
diff --git a/v2/src/lib/update.en.html b/v2/src/lib/update.en.html
deleted file mode 100644
index 99760cb..0000000
--- a/v2/src/lib/update.en.html
+++ /dev/null
@@ -1,3 +0,0 @@
- <p class="timestamp">
- Updated on <time datetime="$update">$formatted_update</time>
- </p>
diff --git a/v2/src/lib/update.pt.html b/v2/src/lib/update.pt.html
deleted file mode 100644
index 99760cb..0000000
--- a/v2/src/lib/update.pt.html
+++ /dev/null
@@ -1,3 +0,0 @@
- <p class="timestamp">
- Updated on <time datetime="$update">$formatted_update</time>
- </p>
diff --git a/v2/src/redirect.mappings b/v2/src/redirect.mappings
deleted file mode 100644
index 6701b19..0000000
--- a/v2/src/redirect.mappings
+++ /dev/null
@@ -1,3 +0,0 @@
-index.html en/index.html
-favicon.svg img/favicon.svg
-security.txt .well-known/security.txt