version 1.148, 2003/12/22 21:57:25
|
version 1.149, 2003/12/22 22:09:06
|
Line 25
|
Line 25
|
# |
# |
# http://www.lon-capa.org/ |
# http://www.lon-capa.org/ |
# |
# |
# |
|
# (TeX Content Handler |
|
# |
|
# 05/29/00,05/30,10/11 Gerd Kortemeyer) |
|
# |
|
# 11/28,11/29,11/30,12/01,12/02,12/04,12/23 Gerd Kortemeyer |
|
# 03/23 Guy Albertelli |
|
# 03/24,03/29,04/03 Gerd Kortemeyer |
|
# 05/03,05/05,05/07 Gerd Kortemeyer |
|
# 06/23,08/07,08/11,8/13,8/17,8/18,8/24,9/26,10/16 Gerd Kortemeyer |
|
# 12/04,12/05 Guy Albertelli |
|
# 12/05 Gerd Kortemeyer |
|
# 12/05 Guy Albertelli |
|
# 12/06,12/07 Gerd Kortemeyer |
|
# 12/25 Gerd Kortemeyer |
|
# YEAR=2002 |
|
# 1/17 Gerd Kortemeyer |
|
# |
|
### |
### |
|
|
############################################################################### |
############################################################################### |
Line 219 sub metaeval {
|
Line 201 sub metaeval {
|
$newentry=~s/^\s*//; |
$newentry=~s/^\s*//; |
if ($newentry !~m|^/res|) { $newentry=$prefix.$newentry; } |
if ($newentry !~m|^/res|) { $newentry=$prefix.$newentry; } |
} |
} |
unless ($metadatafields{$unikey}=~/\w/) { |
# actually store |
$metadatafields{$unikey}=$newentry; |
$metadatafields{$unikey}=$newentry; |
} |
|
} |
} |
} |
} |
} |
} |
Line 981 sub publish {
|
Line 962 sub publish {
|
$ENV{'user.domain'}; |
$ENV{'user.domain'}; |
$metadatafields{'authorspace'}=$cuname.'@'.$cudom; |
$metadatafields{'authorspace'}=$cuname.'@'.$cudom; |
|
|
# ----------------------------------------------------------- Parse file itself |
|
# read %metadatafields from file itself |
|
|
|
$allmeta=&parseformeta($source,$style); |
|
# ------------------------------------------------ Check out directory hierachy |
# ------------------------------------------------ Check out directory hierachy |
|
|
my $thisdisfn=$source; |
my $thisdisfn=$source; |
Line 1001 sub publish {
|
Line 978 sub publish {
|
$scrout.=&metaread($logfile,$currentpath.'default.meta',$prefix); |
$scrout.=&metaread($logfile,$currentpath.'default.meta',$prefix); |
$prefix=~s|^\.\./||; |
$prefix=~s|^\.\./||; |
} |
} |
|
# ----------------------------------------------------------- Parse file itself |
|
# read %metadatafields from file itself |
|
|
|
$allmeta=&parseformeta($source,$style); |
|
|
# ------------------- Clear out parameters and stores (there should not be any) |
# ------------------- Clear out parameters and stores (there should not be any) |
|
|
Line 1357 sub phasetwo {
|
Line 1338 sub phasetwo {
|
$allkeywords=~s/^\,//; |
$allkeywords=~s/^\,//; |
$metadatafields{'keywords'}=$allkeywords; |
$metadatafields{'keywords'}=$allkeywords; |
|
|
|
# check if custom distribution file is specified |
|
if ($metadatafields{'copyright'} eq 'custom') { |
|
my $file=$metadatafields{'customdistributionfile'}; |
|
unless ($file=~/\.rights$/) { |
|
return |
|
'<font color="red">'.&mt('No valid custom distribution rights file specified, FAIL'). |
|
'</font>'; |
|
} |
|
} |
{ |
{ |
print $logfile "\nWrite metadata file for ".$source; |
print $logfile "\nWrite metadata file for ".$source; |
my $mfh; |
my $mfh; |
Line 1562 sub phasetwo {
|
Line 1552 sub phasetwo {
|
'"><font size="+2">'. |
'"><font size="+2">'. |
&mt('Back to Source Directory').'</font></a></p>'); |
&mt('Back to Source Directory').'</font></a></p>'); |
} |
} |
|
return '<p><font color="green">'.&mt('Done').'</font></p>'; |
} |
} |
|
|
######################################### |
######################################### |
Line 1861 ENDDIFF
|
Line 1852 ENDDIFF
|
my ($outstring,$error)=&publish($thisfn,$thistarget,$thisembstyle); |
my ($outstring,$error)=&publish($thisfn,$thistarget,$thisembstyle); |
$r->print('<hr />'.$outstring); |
$r->print('<hr />'.$outstring); |
} else { |
} else { |
$r->print('<hr />'); |
$r->print('<hr />'. |
&phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget); |
&phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget)); |
} |
} |
} |
} |
$r->print('</body></html>'); |
$r->print('</body></html>'); |