#!/bin/bash

set -e

while getopts 'd:' opt
do
	case $opt in
		d)
			db=$OPTARG
			;;
		?)
			exit 1
			;;
	esac
done

if [[ -z $db ]]
then
	echo "$0:" '-d is required' >&2
	exit 1
fi

sqlite3 $db < posthighlights.sql | awk -F  '{printf "%s\n\n%s\n", $1, $3}'
