[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debate Transcripts



>>>>> "Jason" == Jason Gunthorpe <jgg@ualberta.ca> writes:

    Jason> The raw transcript is a bit hard to read but it is 'more
    Jason> complete' than the HTML verison which only includes the
    Jason> candidates responses and not the interm chatter.

Not sure if this is the correct spot, but anyway, I have written a
Perl script that will process the raw transcript into a format that is
a bit more human readable (IMHO).

#!/usr/bin/perl -w
use strict;

my $time;
my $person;
my $message;


format STDOUT_TOP =
Transcript page @<
$%
.
format STDOUT = 
@<<<<<<<<<<<<<<<<<< @<<<<<<<<<< ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$time, $person, $message
~~                              ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$message
.

while (<>) {
  if (/(\S+)\s+<([^>]+)>\s+(.*)/) {
    $time = localtime($1);
    $person = $2;
    $message = $3;
    write;
  }
  elsif (/(\S+)\s+(\*)\s+(.*)/) {
    $time = localtime($1);
    $person = $2;
    $message = $3;
    write;
  }
}
Probably can be improved on, but it works (I think) ;-)
-- 
Brian May <bam@debian.org>

Reply to: