#!/bin/sh
workdir=$PWD

for dir in $(find * -type d -maxdepth 1)
do
	cd "${workdir}/${dir}" || exit

	for bug in *-*-*T*
	do
		echo "=> ${bug// /%20} ${bug%%.gmi}"
		echo '```'
		sed  '/^$/Q' "$bug"
		echo '```'
	done > "${workdir}/${dir}/index.gmi"
done