version 1.23, 2001/11/29 15:01:04
|
version 1.24, 2001/11/29 19:00:56
|
Line 317 exit;
|
Line 317 exit;
|
# ------------------------ Final output at end of markup parsing and formatting |
# ------------------------ Final output at end of markup parsing and formatting |
sub end { |
sub end { |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return "<br />THE END\n"; |
return "</body></html>\n"; |
} |
} |
if ($mode eq 'install') { |
if ($mode eq 'install') { |
return ''; |
return ''; |
Line 336 sub format_lpml {
|
Line 336 sub format_lpml {
|
my (@tokeninfo)=@_; |
my (@tokeninfo)=@_; |
my $date=`date`; chop $date; |
my $date=`date`; chop $date; |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
$lpml = "<br /><font size='+2'>LPML Description Page (dist=$dist, ". |
$lpml=<<END; |
|
<html> |
|
<head> |
|
<title>LPML Description Page (dist=$dist, $date)</title> |
|
</head> |
|
<body> |
|
END |
|
$lpml .= "<br /><font size='+2'>LPML Description Page (dist=$dist, ". |
"$date)". |
"$date)". |
"</font>"; |
"</font>"; |
$lpml .=<<END; |
$lpml .=<<END; |
<ul> |
<ul> |
<li>About this file</li> |
<li><a href='#about'>About this file</a></li> |
<li>Software Package Description</li> |
<li><a href='#ownperms'>File Type Ownership and Permissions |
<li>Directory Structure</li> |
Descriptions</a></li> |
<li>File Type Ownership and Permissions</li> |
<li><a href='#package'>Software Package Description</a></li> |
<li>File and Directory Structure</li> |
<li><a href='#directories'>Directory Structure</a></li> |
|
<li><a href='#files'>File and Directory Structure</a></li> |
</ul> |
</ul> |
END |
END |
$lpml .=<<END; |
$lpml .=<<END; |
|
<br /> <br /><a name='about' /> |
<font size='+2'>About this file</font> |
<font size='+2'>About this file</font> |
<p> |
<p> |
This file is generated dynamically by <tt>lpml_parse.pl</tt> as |
This file is generated dynamically by <tt>lpml_parse.pl</tt> as |
Line 440 sub format_categories {
|
Line 449 sub format_categories {
|
my $text=&trim($parser->get_text('/categories')); |
my $text=&trim($parser->get_text('/categories')); |
$parser->get_tag('/categories'); |
$parser->get_tag('/categories'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $categories="\n<br />BEGIN CATEGORIES\n$text\n". |
return $categories="\n<br /> <br />". |
"<br />END CATEGORIES\n"; |
"\n<a name='ownperms'>". |
|
"\n<font size='+2'>File Type Ownership and Permissions". |
|
" Descriptions</font>". |
|
"\n<table>\n". |
|
"<br />\n$text\n". |
|
"</table>\n"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $categories="\n". |
|
"\nFile Type Ownership and Permissions". |
|
" Descriptions". |
|
"\n"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 496 sub format_rpm {
|
Line 516 sub format_rpm {
|
$parser->get_tag('/rpm'); |
$parser->get_tag('/rpm'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpm=<<END; |
return $rpm=<<END; |
|
<br /> <br /> |
|
<a name='package' /> |
<font size='+2'>Software Package Description</font> |
<font size='+2'>Software Package Description</font> |
<p> |
<p> |
<table bgcolor='#ffffff' border='0' cellpadding='10' cellspacing='0'> |
<table bgcolor='#ffffff' border='0' cellpadding='10' cellspacing='0'> |
Line 535 sub format_rpmName {
|
Line 557 sub format_rpmName {
|
my $text=&trim($parser->get_text('/rpmName')); |
my $text=&trim($parser->get_text('/rpmName')); |
$parser->get_tag('/rpmName'); |
$parser->get_tag('/rpmName'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmName="\n<br />RPMNAME $text"; |
return $rpmName="\nName : $text"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $rpmName="\nName : $text"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 546 sub format_rpmVersion {
|
Line 571 sub format_rpmVersion {
|
my $text=$parser->get_text('/rpmVersion'); |
my $text=$parser->get_text('/rpmVersion'); |
$parser->get_tag('/rpmVersion'); |
$parser->get_tag('/rpmVersion'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmVersion="\n<br />RPMVERSION $text"; |
return $rpmVersion="\nVersion : $text"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $rpmVersion="\nVersion : $text"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 557 sub format_rpmRelease {
|
Line 585 sub format_rpmRelease {
|
my $text=$parser->get_text('/rpmRelease'); |
my $text=$parser->get_text('/rpmRelease'); |
$parser->get_tag('/rpmRelease'); |
$parser->get_tag('/rpmRelease'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmRelease="\n<br />RPMRELEASE $text"; |
return $rpmRelease="\nRelease : $text"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $rpmRelease="\nRelease : $text"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 568 sub format_rpmVendor {
|
Line 599 sub format_rpmVendor {
|
my $text=$parser->get_text('/rpmVendor'); |
my $text=$parser->get_text('/rpmVendor'); |
$parser->get_tag('/rpmVendor'); |
$parser->get_tag('/rpmVendor'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmVendor="\n<br />RPMVENDOR $text"; |
return $rpmVendor="\nVendor : $text"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $rpmVendor="\nVendor : $text"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 579 sub format_rpmBuildRoot {
|
Line 613 sub format_rpmBuildRoot {
|
my $text=$parser->get_text('/rpmBuildRoot'); |
my $text=$parser->get_text('/rpmBuildRoot'); |
$parser->get_tag('/rpmBuildRoot'); |
$parser->get_tag('/rpmBuildRoot'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmBuildRoot="\n<br />RPMBUILDROOT $text"; |
return $rpmBuildRoot="\nBuild Root : $text"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $rpmBuildRoot="\nBuild Root : $text"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 590 sub format_rpmCopyright {
|
Line 627 sub format_rpmCopyright {
|
my $text=$parser->get_text('/rpmCopyright'); |
my $text=$parser->get_text('/rpmCopyright'); |
$parser->get_tag('/rpmCopyright'); |
$parser->get_tag('/rpmCopyright'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmCopyright="\n<br />RPMCOPYRIGHT $text"; |
return $rpmCopyright="\nLicense : $text"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $rpmCopyright="\nLicense : $text"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 601 sub format_rpmGroup {
|
Line 641 sub format_rpmGroup {
|
my $text=$parser->get_text('/rpmGroup'); |
my $text=$parser->get_text('/rpmGroup'); |
$parser->get_tag('/rpmGroup'); |
$parser->get_tag('/rpmGroup'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmGroup="\n<br />RPMGROUP $text"; |
return $rpmGroup="\nGroup : $text"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $rpmGroup="\nGroup : $text"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 612 sub format_rpmSource {
|
Line 655 sub format_rpmSource {
|
my $text=$parser->get_text('/rpmSource'); |
my $text=$parser->get_text('/rpmSource'); |
$parser->get_tag('/rpmSource'); |
$parser->get_tag('/rpmSource'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmSource="\n<br />RPMSOURCE $text"; |
return $rpmSource="\nSource : $text"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $rpmSource="\nSource : $text"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 623 sub format_rpmAutoReqProv {
|
Line 669 sub format_rpmAutoReqProv {
|
my $text=$parser->get_text('/rpmAutoReqProv'); |
my $text=$parser->get_text('/rpmAutoReqProv'); |
$parser->get_tag('/rpmAutoReqProv'); |
$parser->get_tag('/rpmAutoReqProv'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmAutoReqProv="\n<br />RPMAUTOREQPROV $text"; |
return $rpmAutoReqProv="\nAutoReqProv : $text"; |
|
} |
|
if ($mode eq 'text') { |
|
return $rpmAutoReqProv="\nAutoReqProv : $text"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 633 sub format_rpmAutoReqProv {
|
Line 682 sub format_rpmAutoReqProv {
|
sub format_rpmdescription { |
sub format_rpmdescription { |
my $text=$parser->get_text('/rpmdescription'); |
my $text=$parser->get_text('/rpmdescription'); |
$parser->get_tag('/rpmdescription'); |
$parser->get_tag('/rpmdescription'); |
|
$text=~s/\n//g; |
|
$text=~s/\\n/\n/g; |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmdescription="\n<br />RPMDESCRIPTION $text"; |
return $rpmdescription="\nDescription : $text"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $rpmdescription="\nDescription : $text"; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 645 sub format_rpmpre {
|
Line 699 sub format_rpmpre {
|
my $text=$parser->get_text('/rpmpre'); |
my $text=$parser->get_text('/rpmpre'); |
$parser->get_tag('/rpmpre'); |
$parser->get_tag('/rpmpre'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $rpmpre="\n<br />RPMPRE $text"; |
# return $rpmpre="\n<br />RPMPRE $text"; |
|
return ''; |
} |
} |
else { |
else { |
return ''; |
return ''; |
Line 656 sub format_directories {
|
Line 711 sub format_directories {
|
my $text=$parser->get_text('/directories'); |
my $text=$parser->get_text('/directories'); |
$parser->get_tag('/directories'); |
$parser->get_tag('/directories'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $directories="\n<br />BEGIN DIRECTORIES\n$text\n<br />". |
return $directories="\n<br /> <br />". |
"END DIRECTORIES\n"; |
"<a name='directories' />". |
|
"<font size='+2'>Directory Structure</font>". |
|
"\n$text\n<br />". |
|
"\n"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $directories="\nDirectory Structure\n$text\n". |
|
"\n"; |
} |
} |
elsif ($mode eq 'install') { |
elsif ($mode eq 'install') { |
return "\n".'directories:'."\n".$text; |
return "\n".'directories:'."\n".$text; |
Line 722 sub format_files {
|
Line 784 sub format_files {
|
my $text=$parser->get_text('/files'); |
my $text=$parser->get_text('/files'); |
$parser->get_tag('/files'); |
$parser->get_tag('/files'); |
if ($mode eq 'html') { |
if ($mode eq 'html') { |
return $directories="\n<br />BEGIN FILES\n$text\n<br />END FILES\n"; |
return $directories="\n<br /> <br />". |
|
"<a name='files' />". |
|
"<font size='+2'>File and Directory Structure</font>". |
|
"\n$text\n<br />". |
|
"\n"; |
|
} |
|
elsif ($mode eq 'text') { |
|
return $directories="\n". |
|
"File and Directory Structure". |
|
"\n$text\n". |
|
"\n"; |
} |
} |
elsif ($mode eq 'install') { |
elsif ($mode eq 'install') { |
return "\n".'files:'."\n".$text. |
return "\n".'files:'."\n".$text. |