echo "\n## $$(LANG=en_US date +'%B %Y' -d $${month}-01)"
echo '``` table'
echo '---\nheader: True\n---'
sqlite3 --header -csv $< "SELECT file as Filename, SUM(added) AS Added, SUM(-removed) AS Removed FROM commits WHERE author='$${author}' and strftime('%Y-%m', date)='$${month}' GROUP BY Filename"
sqlite3 --header -csv $< "SELECT file as Filename, SUM(added) AS Added, SUM(-removed) AS Removed FROM commits WHERE author='$${author}' AND strftime('%Y-%m', date)='$${month}' GROUP BY Filename"
echo '```'
echo -n "Net Characters Added\n: "
sqlite3 $< "SELECT SUM(added+ -removed) FROM commits WHERE author='$${author}' and strftime('%Y-%m', date)='$${month}'"
echo '\n``` table'
echo '---\nheader: True\n---'
sqlite3 --header -csv combined-daylog.sqlite "SELECT date AS Date, SUM(hours) AS Hours FROM days WHERE author='$${author}' AND strftime('%Y-%m', date)='$${month}' AND apr != '' AND Hours >= 1 GROUP BY date"
echo '```'
echo -n "Days spent at office\n: "
sqlite3 combined-daylog.sqlite "SELECT COUNT(DISTINCT(date)) AS Days FROM days WHERE author='$${author}' AND strftime('%Y-%m', date)='$${month}' AND apr != '' AND hours >= 1"