projects
/
tpope-extra.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e02280
)
vCalendar fixes
author
Tim Pope
<code@tpope.net>
Mon, 12 Dec 2005 03:08:45 +0000
(
03:08
+0000)
committer
Tim Pope
<code@tpope.net>
Mon, 12 Dec 2005 03:08:45 +0000
(
03:08
+0000)
perl/schedproc
patch
|
blob
|
history
diff --git
a/perl/schedproc
b/perl/schedproc
index f1e462ca379ad235676a363adc49b87b9a7dc1c2..81f4a1aec943be197811efe3cfe9675544930d98 100755
(executable)
--- a/
perl/schedproc
+++ b/
perl/schedproc
@@
-453,7
+453,7
@@
EOF
my @schedule = get_schedule(@_);
open(STDOUT, ">" . $file) || die $! if(defined($file) && (! -d $file));
open(STDOUT, ">/dev/null") || die $! if(defined($file) && (-d $file));
my @schedule = get_schedule(@_);
open(STDOUT, ">" . $file) || die $! if(defined($file) && (! -d $file));
open(STDOUT, ">/dev/null") || die $! if(defined($file) && (-d $file));
- print "BEGIN:VCALENDAR$r\nVERSION:2.0$r\nMETHOD:PUBLISH$r\n$timezone";
+ print "BEGIN:VCALENDAR$r\n
PRODID:-//Tim Pope//NONSGML Schedproc//EN$r\n
VERSION:2.0$r\nMETHOD:PUBLISH$r\n$timezone";
foreach my $row (@schedule) {
map { s/\n/-/g; $_} %$row;
my ($starttime, $stoptime)=($row->{'begin'}, $row->{'end'});
foreach my $row (@schedule) {
map { s/\n/-/g; $_} %$row;
my ($starttime, $stoptime)=($row->{'begin'}, $row->{'end'});
@@
-471,7
+471,7
@@
EOF
if(defined($file) && (-d $file)) {
open FH, ">$file/" . $row->{'id'} . ".vcs" or die "$!";
select FH;
if(defined($file) && (-d $file)) {
open FH, ">$file/" . $row->{'id'} . ".vcs" or die "$!";
select FH;
- print "BEGIN:VCALENDAR$r\nVERSION:2.0$r\nMETHOD:PUBLISH$r\n$timezone";
+ print "BEGIN:VCALENDAR$r\n
PRODID:-//Tim Pope//NONSGML Schedproc//EN$r\n
VERSION:2.0$r\nMETHOD:PUBLISH$r\n$timezone";
}
print "BEGIN:VEVENT$r\n";
print "ORGANIZER:mailto:" . $opts{'email'} . "$r\n" if $opts{'email'};
}
print "BEGIN:VEVENT$r\n";
print "ORGANIZER:mailto:" . $opts{'email'} . "$r\n" if $opts{'email'};
@@
-551,7
+551,7
@@
sub do_html_schedule {
$b=~s/(1[3-9]|2\d|00):(\d\d)AM/sprintf "%d:%02dPM",abs $1-12,$2/e;
print "<td>$a-<wbr />$b</td>";
print "<td>" . $row->{'duration'} . "</td>";
$b=~s/(1[3-9]|2\d|00):(\d\d)AM/sprintf "%d:%02dPM",abs $1-12,$2/e;
print "<td>$a-<wbr />$b</td>";
print "<td>" . $row->{'duration'} . "</td>";
- print "<td>" .
$row->{'location'}
. "</td>";
+ print "<td>" .
(ref($row->{'location'})?"":$row->{'location'})
. "</td>";
print "</tr>\n";
}
print "</table>\n";
print "</tr>\n";
}
print "</table>\n";