#!/usr/bin/perl

$tod = 1530; # 1730

$title = "IETF 58 XCON Meeting Agenda";

print <<EOT
Content-Type: text/html

<HTML><HEAD><TITLE>$title</TITLE></HEAD>
<BODY>
<H1>$title</h1>

<pre>
Wednesday, November 12 at 1530-1730
===================================

CHAIRS: Alan Johnston <alan.johnston\@mci.com>
        Adam Roach <adam\@dynamicsoft.com>

AGENDA:
</pre>

<CENTER><TABLE border=1>
<TR>
  <TH>Time</TH>
  <TH>Length</TH>
  <TH>Name</TH>
  <TH>Topic</TH>
  <TH>Draft</TH>
  <TH>Slides</TH>
EOT
;

foreach $entry (<DATA>)
{
  chop;
  ($time, $name, $topic, $drafts, $presentations) = split(';', $entry);
  @drafts = split(',', $drafts);
  @presentations = split(',', $presentations);
  $start = $tod;
  $h = int($tod / 100);
  $m = $tod % 100;
  $m += $time;
  $h += int($m / 60);
  $m %= 60;
  $tod = $h*100 + $m;
  print "<TR>\n";
  print "  <TD>$start - $tod</TD>\n";
  print "  <TD>$time minutes</TD>\n";
  print "  <TD>$name</TD>\n";
  print "  <TD>$topic</TD>\n";
  print "  <TD>";
  foreach $draft (@drafts)
  {
    $draft =~ s/(.*)/<a href="\/xcon\/drafts\/$1">$1<\/a>/;
  }
  print join ("<BR>",@drafts);
  print "  </TD>\n";
  print "  <TD>";
  foreach $presentation (@presentations)
  {
    $presentation =~ s/([^.]*)\.(.*)/<a href="slides\/$1.$2">$2<\/a>/;
  }
  print join (", ",@presentations);
  print "  </TD>\n";
  print "</TR>\n";
}


print "</TABLE></CENTER></BODY></HTML>";

__DATA__
5;Chairs;Agenda Bash;;chairs-xcon.ppt,chairs-xcon.pdf
10;Chairs;Milestone Review;draft-even-xcon-conference-scenarios-00.txt,draft-even-xcon-media-policy-requirements-00.txt;evan-scenario.ppt,evan-scenario.pdf,evan-media_policy_req.ppt,evan-media_policy_req.pdf
10;Joerg Ott;Floor Control;draft-koskelainen-xcon-floor-control-req-00.txt;ott-58-xcon-fc-req-01.ppt,ott-58-xcon-fc-req-01.pdf
15;Marcus Brunner;Floor Control;draft-brunner-xcon-fc-issues-00.txt;brunner-xcon_IETF58.ppt,brunner-xcon_IETF58.pdf
20;Hisham Khartabil;CPCP;draft-koskelainen-xcon-cpcp-reqs-01.txt,draft-koskelainen-xcon-xcap-cpcp-usage-01.txt;khartabil-CPCP.ppt,khartabil-CPCP.pdf
15;Orit Levin;CPCP;draft-levin-xcon-cpcp-00.txt;levin-CPCP.ppt,levin-CPCP.pdf
25;Rohan Mahy;Media Policy;draft-mahy-xcon-media-policy-control-00.txt;mahy-media-policy.ppt,mahy-media-policy.pdf
20;Cullen Jennings<br>Brian Rosen;Media Policy;;jennings-xconMediaPolicyRan.ppt,jennings-xconMediaPolicyRan.pdf
