Browse CVS Repository
Diff of /tombo/htdocs/pagegen.pl
Parent Directory
| Revision Log
| Revision Graph
| Patch
| 19 |
|
|
| 20 |
opendir(DIR_S, $srcdir) || die; |
opendir(DIR_S, $srcdir) || die; |
| 21 |
while($file = readdir(DIR_S)) { |
while($file = readdir(DIR_S)) { |
| 22 |
next unless ($file =~ /\.tmpl/); |
next unless ($file =~ /\.tmpl$/); |
| 23 |
pagegen($file); |
pagegen($file); |
| 24 |
} |
} |
| 25 |
closedir(DIR_S); |
closedir(DIR_S); |
| 57 |
include_history(OUT); |
include_history(OUT); |
| 58 |
} |
} |
| 59 |
if (/^<!-- HEADLINE -->$/) { |
if (/^<!-- HEADLINE -->$/) { |
| 60 |
include_headline(OUT); |
include_headline(OUT); |
| 61 |
|
} |
| 62 |
|
# if (/^<!-- DL\(([0-9a-zA-Z_]+), +([0-9]+)\) -->$/) { |
| 63 |
|
if (/^<!-- DL\(([0-9a-zA-Z_]+), *([0-9]+)\) -->$/) { |
| 64 |
|
expand_dl(OUT, $1, $2); |
| 65 |
} |
} |
| 66 |
print OUT "$_\n"; |
print OUT "$_\n"; |
| 67 |
} |
} |
| 69 |
close(OUT); |
close(OUT); |
| 70 |
} |
} |
| 71 |
|
|
| 72 |
|
sub expand_dl() |
| 73 |
|
{ |
| 74 |
|
my ($stream, $prefix, $dlid) = @_; |
| 75 |
|
my ($rs, $disp, $arch, $suffix); |
| 76 |
|
open(DL, "$srcdir/download.conf") || die; |
| 77 |
|
while(<DL>) { |
| 78 |
|
chop; |
| 79 |
|
next if (/^#/); |
| 80 |
|
($rs, $disp, $arch, $suffix, $path, $cmt) = split(/ /); |
| 81 |
|
if ($rs eq "") { |
| 82 |
|
print $stream "<tr><td>$disp<td>$arch<td><a href=\"http://prdownloads.sourceforge.jp/tombo/$dlid/$prefix"."_$suffix.zip\">$prefix"."_$suffix.zip</a><td>$path<td>$cmt\n" |
| 83 |
|
} elsif ($rs ne "c") { |
| 84 |
|
print $stream "<tr><td rowspan=\"$rs\">$disp<td>$arch<td><a href=\"http://prdownloads.sourceforge.jp/tombo/$dlid/$prefix"."_$suffix.zip\">$prefix"."_$suffix.zip</a><td>$path<td>$cmt\n"; |
| 85 |
|
} else { |
| 86 |
|
print $stream "<tr><td>$arch<td><a href=\"http://prdownloads.sourceforge.jp/tombo/$dlid/$prefix"."_$suffix.zip\">$prefix"."_$suffix.zip</a><td>$path<td>$cmt\n"; |
| 87 |
|
} |
| 88 |
|
} |
| 89 |
|
close(DL); |
| 90 |
|
} |
| 91 |
|
|
| 92 |
sub include_top() |
sub include_top() |
| 93 |
{ |
{ |
| 94 |
my ($stream) = @_; |
my ($stream) = @_; |
|
|
Legend:
| Removed from v.1.8 |
|
| changed lines |
| |
Added in v.1.9 |
|
|
| |