summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgen.sh6
-rw-r--r--posts/2025/bulletproof.md4
-rwxr-xr-xrss.sh13
3 files changed, 14 insertions, 9 deletions
diff --git a/gen.sh b/gen.sh
index c0d2f12..44f0bdf 100755
--- a/gen.sh
+++ b/gen.sh
@@ -7,6 +7,9 @@ verbose=0 # Variables to be evaluated as shell arithmetic should be initialized
if [ ! "$(command -v cmark)" ]; then
echo "cmark not installed in $PATH"
fi
+if [ ! "$(command -v lowdown)" ]; then
+ echo "lowdown not installed in $PATH"
+fi
usage="$(basename "$0") [-h] [-v -w WORKDIR -f FILE]
@@ -109,7 +112,8 @@ for m in $MDLIST; do
esac
echo $HEADER > "${OUTPATH}"
- cmark --safe --validate-utf8 -t html --width 80 $m >> "${OUTPATH}"
+ #cmark --safe --validate-utf8 -t html --width 80 $m >> "${OUTPATH}"
+ lowdown -thtml --out-no-smarty $m >> "${OUTPATH}"
echo $FOOTER >> "${OUTPATH}"
if [ $verbose -gt 0 ]; then
diff --git a/posts/2025/bulletproof.md b/posts/2025/bulletproof.md
index cad5818..ad47106 100644
--- a/posts/2025/bulletproof.md
+++ b/posts/2025/bulletproof.md
@@ -100,7 +100,7 @@ Writing a posix-exclusive shell script gets your environment and
configuration set, regardless of how messed-up things might be.
[1]:https://en.wikipedia.org/wiki/Idempotence
-[2]:../2016/redefining-stability.md
-[3]:../ancillary/img/is_it_worth_the_time.png
+[2]:../2016/redefining-stability.html
+[3]:https://www.gluecode.net/images/is_it_worth_the_time.png
[4]:https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/mindex.html
[5]:https://www.gluecode.net/images/BuildAndOwn_Scale.png
diff --git a/rss.sh b/rss.sh
index f709a2e..6017354 100755
--- a/rss.sh
+++ b/rss.sh
@@ -20,8 +20,8 @@ postDir="/var/www/blog/posts"
###
header="""
-<?xml version='1.0' encoding='UTF-8' ?>
-<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>
+<?xml version="1.0" encoding="UTF-8" ?>
+<rss version="2.0">
<channel>
<title>${title}</title>
<link>${link}</link>
@@ -29,28 +29,29 @@ header="""
<atom:link href='${rsslink}' rel='self' type='application/rss+xml' />
"""
-footer="</channel> </rss>"
+footer="</channel></rss>"
echo $header >> $TEMPFILE
postArray=( $(ls -r "$postDir"/*/*.html) )
numPosts=$(ls "$postDir"/*/*.html | wc -l)
echo "numposts is $numPosts"
-postNum=0
for posts in "${postArray[@]}"; do
- let postNum+=1
post=$posts
fullTitle=$(grep -o '>.*</h1>' $post | sed -e 's,>,,g' -e 's,</h1,,g')
postname=${post##*/}
linkadd="$link"/"$postname"
guidadd=$linkadd
+
LEN=$(wc -l ${post}|awk '{print $1}')
extract=$(cat $post | head -n $((${LEN}-1)) | tail -n $((${LEN}-3)) )
+
echo """<item>
<title>$fullTitle</title>
<link>$linkadd</link>
<guid>$linkadd</guid>
- <description>$extract</description>
+ <description>$fulltitle</description>
+ <content type="text/html" mode="escaped">$extract</content>
</item>
""" >> $TEMPFILE
done