-- Added TAG, DURATION and SPECIAL keywords and associated handling.

This commit is contained in:
dfs
1997-09-16 03:16:30 +00:00
parent dd917df96f
commit 31bc3c8aa8
19 changed files with 215 additions and 70 deletions

View File

@@ -2,7 +2,7 @@
# rem2html
#
# $Id: rem2html,v 1.2 1997-07-06 14:36:01 dfs Exp $
# $Id: rem2html,v 1.3 1997-09-16 03:16:42 dfs Exp $
#
# A script to convert from the output of "remind -p" to Hyper-Text Markup
# Language (HTML), the text format used in WWW documents. By default, it
@@ -91,6 +91,8 @@ sub parse_options {
sub parse_input {
local $where = 0;
local $msg;
local $type;
local $day;
@days = ();
while (<>) {
@@ -109,10 +111,16 @@ sub parse_input {
@nextsc = split(" ");
} else {
last if /rem2(html|ps) end/;
next unless m%^(\d*)/*(\d*)/*(\d*) ([^ ]*)?\s*(.*)$%;
$msg = $5;
$msg = "$4 $msg" if $4;
$days[$3] .= "<P>$msg</P>";
next unless m/^(....).(\d*).(\d*)\s+(\S+)\s+(\S+)\s+(\S+)\s*(.*)$/;
$type = $1;
$msg = $7;
$day = $3;
next unless ($type eq "HTML" || ($type =~ /\d\d\d\d/));
if ($type eq "HTML") {
$days[$day] .= "$msg ";
} else {
$days[$day] .= "<P>$msg</P>";
}
}
$where++;
}