summaryrefslogtreecommitdiffstats
path: root/genblog
diff options
context:
space:
mode:
authorroot <root@zacharyscheiman.com>2023-03-10 18:11:06 +0000
committerroot <root@zacharyscheiman.com>2023-03-10 18:11:06 +0000
commit53ba59c39dab56533ec965bfdfc28bd98ab38db0 (patch)
tree797f54e6f73bae27c3c39a77259be878dced93a0 /genblog
downloadsite-53ba59c39dab56533ec965bfdfc28bd98ab38db0.tar.gz
site-53ba59c39dab56533ec965bfdfc28bd98ab38db0.tar.bz2
site-53ba59c39dab56533ec965bfdfc28bd98ab38db0.zip
initial commit
Diffstat (limited to 'genblog')
-rwxr-xr-xgenblog15
1 files changed, 15 insertions, 0 deletions
diff --git a/genblog b/genblog
new file mode 100755
index 0000000..0705892
--- /dev/null
+++ b/genblog
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+blogs=$(ls -ct1 blog/*.html)
+date() {
+ ls -ct1l --time-style=+'%Y %b %d' $1 | cut -d ' ' -f 6-8
+}
+[ -f bloglist.html ] && rm bloglist.html
+echo '<p style="font-family: sans-serif; color: white;">' >> bloglist.html
+[ "$blogs" ] || echo "No blogs yet :)" >> bloglist.html
+
+for i in $blogs; do
+ name=$(echo $i | sed 's/blog\///' | sed 's/\..*//')
+ echo $(date $i)" - <a href=\"https://squi.bid/$i\" target=\"top\" id=\"link\">$name</a><br>" >> bloglist.html
+done
+echo '</p>' >> bloglist.html