Simple and boring static site generator
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
IFS='
|
|
|
|
'
|
|
|
|
. ./local.env
|
|
|
|
echo '<rss version="2.0">\n' > $DEST/rss.xml
|
|
|
|
printf "\t<channel>\n" >> $DEST/rss.xml
|
|
|
|
printf "\t\t<title>$TITLE</title>\n" >> $DEST/rss.xml
|
|
|
|
printf "\t\t<link>$LINK</link>\n" >> $DEST/rss.xml
|
|
|
|
printf "\t\t<description>$DESC</description>\n" >> $DEST/rss.xml
|
|
|
|
printf "\t\t<language>en-ca</language>\n" >> $DEST/rss.xml
|
|
|
|
printf "\t</channel>\n" >> $DEST/rss.xml
|
|
|
|
for file in `find $SRC -type f -name "*.md"`
|
|
|
|
do
|
|
|
|
printf "\t<item>\n" >> $DEST/rss.xml
|
|
|
|
printf "\t\t<pubDate>`stat -f %Sm $file`</pubDate>\n" >> $DEST/rss.xml
|
|
|
|
printf "\t\t<title>`basename $file|sed s/.md//`</title>\n" >> $DEST/rss.xml
|
|
|
|
printf "\t\t<link>$LINK/`basename $file|sed s/.md/.html/`</link>\n" >> $DEST/rss.xml
|
|
|
|
printf "\t\t<description>`cat $file`</description>" >> $DEST/rss.xml
|
|
|
|
printf "\t</item>\n" >> $DEST/rss.xml
|
|
|
|
done
|
|
|
|
echo "</rss>" >> $DEST/rss.xml
|