#!/bin/bash
#
# /usr/local/bin/channel-timestamp
#
# This shell script is used to add timestamps to closed captioning
# It is called by the main recording script, /usr/local/bin/channel.
#
# Add -xv to the top line to get verbose messages
#
# Changelog:
#  2005-01-12: The parent script now handles child process terminations
#  2005-01-13: Timestamps could use XDS data -- start with the date and
#              include title (not implemented)
#
# *****************************************************************

# Write the first timestamp
echo $(date +%F_%H:%M:%S)_$1$2 >> $3/$4.txt

# Write a timestamp every ten seconds
while true
 do
  sleep 10
  echo $(date +%F_%H:%M:%S)_$1$2 >> $3/$4.txt
done

exit
# EOF

# Folders to search for program files.
PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Email output to specified account.
MAILTO=tna
# KCAL 9 News at 9pm
0 21 * * 6      channel 9, 60min, "News at 9pm", 1
# KNBC 4 Meet the Press
0 8 * * 7       channel 4, 60min, "Meet the Press", 2
# KABC 7 World News Tonight
30 17 * * 7     channel 7, 30min, "World News Tonight", 1
# KCBS 2 60 Minutes
0 19 * * 7      channel 2, 60min, "60 Minutes", 1
# Fox 11 Morning News at 6 AM/ Good Day LA
0 6 * * 1,2,3,4,5       channel 11, 60min, "Morning News at 6", 1
# KCET 28 BBC World News
30 5 * * 1,2,3,4,5      channel 28, 30min, "BBC World News", 3

