|
|
@ -115,4 +115,20 @@ sub parse { |
|
|
|
return scalar @{ $self->{events} }; |
|
|
|
return scalar @{ $self->{events} }; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sub build { |
|
|
|
|
|
|
|
my ($self) = @_; |
|
|
|
|
|
|
|
my $out = ""; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach my $e (@{ $self->{events} }) { |
|
|
|
|
|
|
|
$out .= "$e->{id}\n"; |
|
|
|
|
|
|
|
$out .= sprintf "%s --> %s\n", |
|
|
|
|
|
|
|
$self->build_timing($e->{timing}->[0], 3, ','), |
|
|
|
|
|
|
|
$self->build_timing($e->{timing}->[1], 3, ','); |
|
|
|
|
|
|
|
$out .= "$e->{text}\n"; |
|
|
|
|
|
|
|
$out .= "\n"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $out; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
1; |
|
|
|
1; |
|
|
|