#!/bin/sh

FILES=`ls post--* | tac`
COUNT=`echo $FILES | wc -w`

I=$COUNT
for f in $FILES; do
	echo ""
	echo "<hr>"
	echo ""
	echo "<h2 id=\"$I\"><a href=\"#$I\">#$I</a></h2>"
	echo ""
	cat $f
	echo ""
	echo "[reply](mailto:${MAILING_LIST}@lists.sr.ht?subject=%23$I) [replies](https://lists.sr.ht/${MAILING_LIST}?search=%23$I)"
	echo ""

	I=$(( $I - 1 ))
done
