mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
-- Added TAG, DURATION and SPECIAL keywords and associated handling.
This commit is contained in:
18
www/rem2html
18
www/rem2html
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user