version 1.46, 2001/10/03 11:04:57
|
version 1.52, 2001/10/18 17:59:41
|
Line 11
|
Line 11
|
# 04/16/2001 Scott Harrison |
# 04/16/2001 Scott Harrison |
# 05/03,05/05,05/07 Gerd Kortemeyer |
# 05/03,05/05,05/07 Gerd Kortemeyer |
# 05/28/2001 Scott Harrison |
# 05/28/2001 Scott Harrison |
# 06/23,08/07,08/11,8/13,8/17,8/18,8/24,9/26 Gerd Kortemeyer |
# 06/23,08/07,08/11,8/13,8/17,8/18,8/24,9/26,10/16 Gerd Kortemeyer |
|
|
package Apache::lonpublisher; |
package Apache::lonpublisher; |
|
|
Line 154 sub urlfixup {
|
Line 154 sub urlfixup {
|
} |
} |
|
|
sub publish { |
sub publish { |
|
|
my ($source,$target,$style)=@_; |
my ($source,$target,$style)=@_; |
my $logfile; |
my $logfile; |
my $scrout=''; |
my $scrout=''; |
Line 469 sub publish {
|
Line 470 sub publish {
|
my $keywordout='<p><b>Keywords:</b><br><table border=2><tr>'; |
my $keywordout='<p><b>Keywords:</b><br><table border=2><tr>'; |
my $colcount=0; |
my $colcount=0; |
|
|
{ |
if (length($content)<500000) { |
my $textonly=$content; |
my $textonly=$content; |
$textonly=~s/\<script[^\<]+\<\/script\>//g; |
$textonly=~s/\<script[^\<]+\<\/script\>//g; |
$textonly=~s/\<m\>[^\<]+\<\/m\>//g; |
$textonly=~s/\<m\>[^\<]+\<\/m\>//g; |
Line 479 sub publish {
|
Line 480 sub publish {
|
$textonly=~s/[^a-z\s]//g; |
$textonly=~s/[^a-z\s]//g; |
|
|
my %keywords=(); |
my %keywords=(); |
my $j=0; |
map { |
my $word; |
unless ($nokey{$_}) { |
for (my $i=0; $i<length($textonly); $i++) { |
$keywords{$_}=1; |
my $ch.=substr($textonly,$i,1); |
} |
if ($ch=~/\s/) { |
} ($textonly=~m/(\w+)/g); |
if (length($word)) { |
|
unless ($nokey{$word}) { |
|
$keywords{$word}=1; |
|
} |
|
} |
|
$word=''; |
|
} |
|
else { |
|
$word.=$ch; |
|
} |
|
# map { |
|
# unless ($nokey{$_}) { |
|
# $keywords{$_}=1; |
|
# } |
|
# } ($textonly=~m/(\w+)/g); |
|
} |
|
|
|
my $sizkeys=scalar(keys %keywords); # use this value at some point |
|
map { |
map { |
$keywords{$_}=1; |
$keywords{$_}=1; |
} split(/\W+/,$metadatafields{'keywords'}); |
} split(/\W+/,$metadatafields{'keywords'}); |
Line 518 sub publish {
|
Line 502 sub publish {
|
} |
} |
$colcount++; |
$colcount++; |
} sort keys %keywords; |
} sort keys %keywords; |
$keywordout.='</tr></table>'; |
|
|
|
|
} else { |
|
$keywordout.='<td>File too long for keyword analysis</td>'; |
} |
} |
$scrout.=$keywordout; |
|
|
$keywordout.='</tr></table>'; |
|
|
|
$scrout.=$keywordout; |
|
|
$scrout.=&textfield('Additional Keywords','addkey',''); |
$scrout.=&textfield('Additional Keywords','addkey',''); |
|
|