#!/bin/bash

#You should only consider this a loose model. It's prolly innefficient and
#insecure

#can replace this with a find-by-date sometime
LIST=done/*

#export the data
for i in $LIST
do
DATE=`ls -l $i | cut -b 42-47`
DATE="`echo $DATE | cut -f 1 -d" " | sed -e "s/Jan/1/" -e "s/Feb/2/" -e "s/Mar/3/" -e "s/Apr/4/" -e "s/May/5/" -e "s/Jun/6/" -e "s/Jul/7/"  -e "s/Aug/8/" -e "s/Sep/9/" -e "s/Oct/10/" -e "s/Nov/11/" -e "s/Dec/12/"`/`echo $DATE | cut -f 2 -d" "`/1999"
JOBNUM=`echo $i | cut -f 2 -d/`
TITLE=`grep Title $i | cut -f 2 -d:`
DEPT=`grep Dept $i | cut -f 2 -d:`
TIME=`grep Time $i | cut -f 2 -d:`
echo $DEPT,ASB,-,$DATE,$TITLE,$DATE,Daniel,$DATE,-,$DEPT,$TIME""
done

