#!/bin/bash # RSS RSS_TITLE='muckedout.com' RSS_TITLE_LINK='https://muckedout.com/data/' RSS_TITLE_DESC='mucked out database' 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