summaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/update.sh b/update.sh
index 5cb69af..1259e4a 100755
--- a/update.sh
+++ b/update.sh
@@ -3,7 +3,18 @@
echo Generating index
printf "# l-3.space: all\n\nAll content\n" > index-all.gmi
for f in log*gmi; do
- printf '=> gemini://l-3.space/%s %s\n' $f "$(grep '^# ' $f | head -n1 | cut -d\ -f2-)";
+ printf '=> gemini://l-3.space/%s %s - %s\n' \
+ $f\
+ "$(head -n1 $f | sed 's/Time-stamp: <\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\) ..h.. UTC>/\1/')"\
+ "$(grep '^# ' $f | head -n1 | cut -d\ -f2-)";
done | sort -r >> index-all.gmi
+ed index.gmi <<EOF
+/^## Recent posts/+
++,/^## Indices/-2d
+-r !tail -n +4 index-all.gmi | head -n 5
+w
+q
+EOF
+
gemfeed.py -b gemini://l-3.space -e 'hello@l-3.space' -t l-3.space -a tslil