From 6a0dd29d364844b24f1b6dc4beb2e20b5a634ac2 Mon Sep 17 00:00:00 2001 From: pux Date: Sat, 7 Jan 2023 14:17:56 +0100 Subject: update from pub-docs --- data/update.sh | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'data/update.sh') diff --git a/data/update.sh b/data/update.sh index 687c805..e7cb139 100755 --- a/data/update.sh +++ b/data/update.sh @@ -1,7 +1,21 @@ -#!/bin/sh +#!/bin/bash + +# RSS +RSS_TITLE='omeckman.net pub-docs' +RSS_TITLE_LINK='https://omeckman.net/pub-docs/' +RSS_TITLE_DESC='omeckman.net public documents / $blog' +RSS_MY_URL=${RSS_TITLE_LINK} cp INDEX_template.md INDEX.md +cp template_rss_header.xml index.xml + +#sed -i "s/\\\$TITLE> INDEX.md + + origdate=$(echo "$filename_wo_ext" | cut -f 1 -d '_') + pubdaterfc822=$(python3 rfc822date.py ${origdate}) + + RSS_ITEM_TITLE="$filename_wo_ext" + RSS_ITEM_LINK=${RSS_TITLE_LINK}${filename_wo_ext}.html + RSS_ITEM_PUBDATE=${pubdaterfc822} + RSS_ITEM_DESC=$RSS_ITEM_TITLE + cat template_rss_item.xml >> index.xml + python3 pyreplace.py '$ITEM_TITLE$' "${RSS_ITEM_TITLE}" index.xml + python3 pyreplace.py '$ITEM_LINK$' "${RSS_ITEM_LINK}" index.xml + python3 pyreplace.py '$ITEM_PUBDATE$' "${RSS_ITEM_PUBDATE}" index.xml + python3 pyreplace.py '$ITEM_DESC$' "${RSS_ITEM_DESC}" index.xml fi fi done +cat template_rss_footer.xml >> index.xml + ln -s INDEX.html index.html -- cgit v1.2.2-1-g5e49