tFix index generators regarding title changes - monochromatic - monochromatic blog: http://blog.z3bra.org
(HTM) git clone git://z3bra.org/monochromatic
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 7aa87d1b4d1636f6d3e6bcac1eac33c557b02453
(DIR) parent 189d93c4d34aad2ac95e0d4da56b4daa9432e820
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Fri, 27 Dec 2019 14:39:13 +0100
Fix index generators regarding title changes
Diffstat:
M utils/genindex.sh | 4 ++--
M utils/gophermap.sh | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/utils/genindex.sh b/utils/genindex.sh
t@@ -2,8 +2,8 @@
i=0
for post in $(find 20* -type f -name '*.txt' ! -name 'index.txt'|sort); do
- title="$(sed -n 's/^# \[\(.*\)\].*$/\1/p' $post)"
+ title="$(sed -n 's/^# \(.*\)/\1/p' $post)"
href="/${post%.txt}.html"
- printf '* 0x%04x - [%s](%s)\n' "$i" "$title" "$href"
+ printf '* 0x%04x - [%s](%s)\n' "$i" "$title" "$href"
i=$((i+1))
done | sort -r
(DIR) diff --git a/utils/gophermap.sh b/utils/gophermap.sh
t@@ -1,16 +1,16 @@
#!/bin/sh
+printf '\n'
printf 'z3bra.org - monochromatic blog\n'
printf '==============================\n\n'
i=0
for post in $(find 20* -type f -name '*.txt' ! -name 'index.txt'|sort); do
- title="$(sed -n 's/^# \[\(.*\)\].*$/\1/p' $post)"
+ title="$(sed -n 's/^# \(.*\)/\1/p' $post)"
href="/monochromatic/$post"
printf '[0|0x%04x - %s|%s|server|port]\n' "$i" "$title" "$href"
i=$((i+1))
done | sort -r
-printf '\n'
printf '[h|https://blog.z3bra.org|URL:https://blog.z3bra.org|server|port]\n'
printf '[h|© ISC|URL:https://www.isc.org/licenses/|server|port]\n'