#!/bin/bash # Total hack to colorize speaker IDs # #for i in `ls *.txt` #do # # Word wrap at 220. Makes easier to read # cat $i | fold -s -w 220 > $i.tmp # mv -f $i.tmp $i #done for i in `ls *.txt` do sed -i '1i
' $i
done

for i in `ls *.txt`
do
  echo "Adding HTML to $i"
  title4=`echo $i | sed 's/-128\.txt//g'`
  title5=`echo $title4 | sed 's/off_the_hook__//g'`
  title6=`echo $title5 | sed -E 's/(.{4})(.{2})/\1-\2-/'`
  sed -i "1i 

Off The Hook - $title6

" $i done for i in `ls *.txt` do sed -i '1i ' $i done for i in `ls *.txt` do sed -i '1i ' $i done for i in `ls *.txt` do title1=`echo $i | sed 's/-128\.txt//g'` title2=`echo $title1 | sed 's/off_the_hook__//g'` title3=`echo $title2 | sed -E 's/(.{4})(.{2})/\1-\2-/'` sed -i "1i Off The Hook - $title3" $i done for i in `ls off*` do sed -i '1i ' $i done for i in `ls off*` do sed -i '1i ' $i done for i in `ls off*` do sed -i '1i ' $i done for i in `ls off*` do # Most of these are just quick inserts. Fiddle with colors to make pretty/easy to read. # # SPEAKER_00 = BLACK cat $i | sed -e 's/SPEAKER_00/SPEAKER_00<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_01 = RED cat $i | sed -e 's/SPEAKER_01/SPEAKER_01<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_02 = GREEN cat $i | sed -e 's/SPEAKER_02/SPEAKER_02<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_03 = BLUE cat $i | sed -e 's/SPEAKER_03/SPEAKER_03<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_04 = PURPLE cat $i | sed -e 's/SPEAKER_04/SPEAKER_04<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_05 = CYAN cat $i | sed -e 's/SPEAKER_05/SPEAKER_05<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_06 = MAGENTA cat $i | sed -e 's/SPEAKER_06/SPEAKER_06<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_07 = INDIGO cat $i | sed -e 's/SPEAKER_07/SPEAKER_07<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_08 = MAROON cat $i | sed -e 's/SPEAKER_08/SPEAKER_08<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_09 = OLIVE cat $i | sed -e 's/SPEAKER_09/SPEAKER_09<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_10 = CORAL BROWN cat $i | sed -e 's/SPEAKER_10/SPEAKER_10<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_11 = TEAL cat $i | sed -e 's/SPEAKER_11/SPEAKER_11<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_12 = NAVY cat $i | sed -e 's/SPEAKER_12/SPEAKER_12<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_13 = ORANGE cat $i | sed -e 's/SPEAKER_13/SPEAKER_13<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_14 = SALMON cat $i | sed -e 's/SPEAKER_14/SPEAKER_14<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_15 = BROWN cat $i | sed -e 's/SPEAKER_15/SPEAKER_15<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_16 = CORAL cat $i | sed -e 's/SPEAKER_16/SPEAKER_16<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_17 = VENOM GREEN cat $i | sed -e 's/SPEAKER_17/SPEAKER_17<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_18 = SLATE BLUE cat $i | sed -e 's/SPEAKER_18/SPEAKER_18<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_19 = GOLD cat $i | sed -e 's/SPEAKER_19/SPEAKER_19<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_20 = PINK cat $i | sed -e 's/SPEAKER_20/SPEAKER_20<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_21 = WINDOWS BLUE cat $i | sed -e 's/SPEAKER_21/SPEAKER_21<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_22 = AQUA MARINE cat $i | sed -e 's/SPEAKER_22/SPEAKER_22<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_23 = DEEP SKY BLUE cat $i | sed -e 's/SPEAKER_23/SPEAKER_23<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_24 = DEEP SEA cat $i | sed -e 's/SPEAKER_24/SPEAKER_24<\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_25 = SAGE GREEN cat $i | sed -e 's/SPEAKER_25/SPEAKER_25<\/font>/g' > $i.tmp mv -f $i.tmp $i # Repeat - but with UNDERLINE # SPEAKER_26 = BLACK cat $i | sed -e 's/SPEAKER_26/SPEAKER_26<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_27 = RED cat $i | sed -e 's/SPEAKER_27/SPEAKER_27<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_28 = GREEN cat $i | sed -e 's/SPEAKER_28/SPEAKER_28<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_29 = BLUE cat $i | sed -e 's/SPEAKER_29/SPEAKER_29<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_30 = PURPLE cat $i | sed -e 's/SPEAKER_30/SPEAKER_30<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_31 = CYAN cat $i | sed -e 's/SPEAKER_31/SPEAKER_31<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_32 = MAGENTA cat $i | sed -e 's/SPEAKER_32/SPEAKER_32<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_33 = INDIGO cat $i | sed -e 's/SPEAKER_33/SPEAKER_33<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_34 = MAROON cat $i | sed -e 's/SPEAKER_34/SPEAKER_34<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_35 = OLIVE cat $i | sed -e 's/SPEAKER_35/SPEAKER_35<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_36 = CORAL BROWN cat $i | sed -e 's/SPEAKER_36/SPEAKER_36<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_37 = TEAL cat $i | sed -e 's/SPEAKER_37/SPEAKER_37<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_38 = NAVY cat $i | sed -e 's/SPEAKER_38/SPEAKER_38<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_39 = ORANGE cat $i | sed -e 's/SPEAKER_39/SPEAKER_39<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_40 = SALMON cat $i | sed -e 's/SPEAKER_40/SPEAKER_40<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_41 = BROWN cat $i | sed -e 's/SPEAKER_41/SPEAKER_41<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_42 = CORAL cat $i | sed -e 's/SPEAKER_42/SPEAKER_42<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_43 = VENOM GREEN cat $i | sed -e 's/SPEAKER_43/SPEAKER_43<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_44 = SLATE BLUE cat $i | sed -e 's/SPEAKER_44/SPEAKER_44<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_45 = GOLD cat $i | sed -e 's/SPEAKER_45/SPEAKER_45<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_46 = PINK cat $i | sed -e 's/SPEAKER_46/SPEAKER_46<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_47 = WINDOWS BLUE cat $i | sed -e 's/SPEAKER_47/SPEAKER_47<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_48 = AQUA MARINE cat $i | sed -e 's/SPEAKER_48/SPEAKER_48<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_49 = DEEP SKY BLUE cat $i | sed -e 's/SPEAKER_49/SPEAKER_49<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_50 = DEEP SEA cat $i | sed -e 's/SPEAKER_50/SPEAKER_50<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_51 = SAGE GREEN cat $i | sed -e 's/SPEAKER_51/SPEAKER_51<\/u><\/font>/g' > $i.tmp mv -f $i.tmp $i # Repeat - but with ITALICS # SPEAKER_52 = BLACK cat $i | sed -e 's/SPEAKER_52/SPEAKER_52<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_53 = RED cat $i | sed -e 's/SPEAKER_53/SPEAKER_53<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_54 = GREEN cat $i | sed -e 's/SPEAKER_54/SPEAKER_54<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_55 = BLUE cat $i | sed -e 's/SPEAKER_55/SPEAKER_55<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_56 = PURPLE cat $i | sed -e 's/SPEAKER_56/SPEAKER_56<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_57 = CYAN cat $i | sed -e 's/SPEAKER_57/SPEAKER_57<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_58 = MAGENTA cat $i | sed -e 's/SPEAKER_58/SPEAKER_58<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_59 = INDIGO cat $i | sed -e 's/SPEAKER_59/SPEAKER_59<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_60 = MAROON cat $i | sed -e 's/SPEAKER_60/SPEAKER_60<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_61 = OLIVE cat $i | sed -e 's/SPEAKER_61/SPEAKER_61<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_62 = CORAL BROWN cat $i | sed -e 's/SPEAKER_62/SPEAKER_62<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_63 = TEAL cat $i | sed -e 's/SPEAKER_63/SPEAKER_63<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_64 = NAVY cat $i | sed -e 's/SPEAKER_64/SPEAKER_64<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_65 = ORANGE cat $i | sed -e 's/SPEAKER_65/SPEAKER_65<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_66 = SALMON cat $i | sed -e 's/SPEAKER_66/SPEAKER_66<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_67 = BROWN cat $i | sed -e 's/SPEAKER_67/SPEAKER_67<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_68 = CORAL cat $i | sed -e 's/SPEAKER_68/SPEAKER_68<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_69 = VENOM GREEN cat $i | sed -e 's/SPEAKER_69/SPEAKER_69<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_70 = SLATE BLUE cat $i | sed -e 's/SPEAKER_70/SPEAKER_70<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_71 = GOLD cat $i | sed -e 's/SPEAKER_71/SPEAKER_71<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_72 = PINK cat $i | sed -e 's/SPEAKER_72/SPEAKER_72<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_73 = WINDOWS BLUE cat $i | sed -e 's/SPEAKER_73/SPEAKER_73<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_74 = AQUA MARINE cat $i | sed -e 's/SPEAKER_74/SPEAKER_74<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_75 = DEEP SKY BLUE cat $i | sed -e 's/SPEAKER_75/SPEAKER_75<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_76 = DEEP SEA cat $i | sed -e 's/SPEAKER_76/SPEAKER_76<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # SPEAKER_77 = SAGE GREEN cat $i | sed -e 's/SPEAKER_77/SPEAKER_77<\/i><\/font>/g' > $i.tmp mv -f $i.tmp $i # Misc clean-up cat $i | sed -e 's/-->/--\>/g' > $i.tmp mv -f $i.tmp $i echo "



Return to Off The Hook Audio Archive
" >> $i echo "" >> $i # Rename txt to htm name1=`echo $i | sed -e 's/-128\.txt/\.htm/g'` name2=`echo $name1 | sed -e 's/off_the_hook__//g'` name3=`echo $name2 | sed -E 's/(.{4})(.{2})/\1-\2-/'` mv -f $i $name3 echo "Renaming $i to $name3" done echo "DO FIX: AT&T to AT&T"