added a single additional line to 'index.gmi' to ensure that

a variety of different user's posts is always shown on the main index page.
I also made two changes to 'gemlog.gmi' that fix the handling of tabs and
CRLF newlines respectively. thanks to ~seifferth
This commit is contained in:
deepend 2024-07-02 21:19:33 +00:00
parent cd7072a5ef
commit e1f0bf0db2
3 changed files with 6 additions and 3 deletions

View File

@ -11,10 +11,10 @@ While this is an aggregated gemlog for all users, this does not imply that it is
EOF
get() {
grep \
'^=>[ ]\+[^ ]\+[ ]\+[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]' \
grep -P \
'^=>[ \t]+[^ \t]+[ \t]+[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]' \
-s "$@" |
sed 's,\t, ,g;s, *$,,
sed 's,\r,,g;s,\t, ,g;s, *$,,
s,^/home/,,
# Link processing in sed can be quite messy; Hence the comments

View File

@ -15,6 +15,7 @@ Here are some recent gemlog posts by our esteemed users:
$(./gemlog.gmi | grep \
'^=>[ \t]\+[^ ]\+[ \t]\+[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]' |
awk 'i[$NF]++ < 1' |
head -n6)
=> gemlog.gmi See the complete list of aggregated gemlog posts

2
redirect.gmi Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
printf "%s %s\r\n" 31 /