#!/usr/bin/env bash # Makes RSS feed (feed.xml) # Currently missing description and pubDate # Based off https://en.wikipedia.org/wiki/RSS, particularly the example printf "\n\n\n\n Benjamin Zimmerman's webfolio\n The feed for my webfolio, I guess\n https://engl-webfolio.askiiart.net\n $(TZ='UTC' date --rfc-2822)" >feed.xml find . -name '*.html' -print | while read -r item; do # Skip template and index if [[ $item == "./index.html" || $item == "./template.html" ]]; then continue fi item="${item%.*}" item="${item#./}" TITLE=$(grep -m 1 -oP '(?<=^# ).*' ${item}.md | cat) printf "\n \n ${TITLE}\n https://askiiart.net/${item}.html\n " >>feed.xml done printf "\n\n\n" >>feed.xml