--- loncom/build/lpml_parse.pl 2001/11/29 19:00:56 1.24 +++ loncom/build/lpml_parse.pl 2001/12/01 16:51:07 1.25 @@ -8,7 +8,7 @@ # 9/17,9/18 - Scott Harrison # 11/4,11/5,11/6,11/7,11/16,11/17 - Scott Harrison # -# $Id: lpml_parse.pl,v 1.24 2001/11/29 19:00:56 harris41 Exp $ +# $Id: lpml_parse.pl,v 1.25 2001/12/01 16:51:07 harris41 Exp $ ### ############################################################################### @@ -49,7 +49,7 @@ Only the 1st argument is mandatory for t Example: cat ../../doc/loncapafiles.lpml |\\ -perl lpml_parse.pl html default /home/sherbert/loncapa /tmp/install +perl lpml_parse.pl html development default /home/sherbert/loncapa /tmp/install END # ------------------------------------------------- Grab command line arguments @@ -198,6 +198,7 @@ my $category_att_name; my $category_att_type; my $chown; my $chmod; +my $abbreviation; # space-free abbreviation; esp. for image names my $rpm; my $rpmSummary; my $rpmName; @@ -255,6 +256,7 @@ $parser->{textify}={ sourceroot => \&format_sourceroot, categories => \&format_categories, category => \&format_category, + abbreviation => \&format_abbreviation, targetdir => \&format_targetdir, chown => \&format_chown, chmod => \&format_chmod, @@ -339,12 +341,13 @@ sub format_lpml { $lpml=< -LPML Description Page (dist=$dist, $date) +LPML Description Page +(dist=$dist, categorytype=$categorytype, $date) END $lpml .= "
LPML Description Page (dist=$dist, ". - "$date)". + "categorytype=$categorytype, $date)". ""; $lpml .=< @@ -453,14 +456,23 @@ sub format_categories { "\n". "\nFile Type Ownership and Permissions". " Descriptions". - "\n\n". - "
\n$text\n". + "\n

This table shows what permissions and ownership settings ". + "correspond to each category.

". + "\n
\n". + "". + "". + "". + "". + "". + "\n$text\n". "
IconCategory NamePermissions ". + "($categorytype)
\n"; } elsif ($mode eq 'text') { return $categories="\n". "\nFile Type Ownership and Permissions". " Descriptions". + "\n$text". "\n"; } else { @@ -472,12 +484,21 @@ sub format_category { my (@tokeninfo)=@_; $category_att_name=$tokeninfo[2]->{'name'}; $category_att_type=$tokeninfo[2]->{'type'}; - $chmod='';$chown=''; + $abbreviation=''; $chmod='';$chown=''; $parser->get_text('/category'); $parser->get_tag('/category'); if ($mode eq 'html') { - return $category="\n
CATEGORY $category_att_name ". - "$category_att_type $chmod $chown"; + if ($category_att_type eq $categorytype) { + return $category="". + "\n". + "${category_att_name}\n". + "$chmod $chown\n". + "". + "\n"; +# return $category="\n
CATEGORY $category_att_name ". +# "$category_att_type $chmod $chown"; + } } else { if ($category_att_type eq $categorytype) { @@ -488,6 +509,17 @@ sub format_category { return ''; } } +# --------------------------------------------------- Format categories section +sub format_abbreviation { + my @tokeninfo=@_; + $abbreviation=''; + my $text=&trim($parser->get_text('/abbreviation')); + if ($text) { + $parser->get_tag('/abbreviation'); + $abbreviation=$text; + } + return ''; +} # -------------------------------------------------------- Format chown section sub format_chown { my @tokeninfo=@_; @@ -682,12 +714,14 @@ sub format_rpmAutoReqProv { sub format_rpmdescription { my $text=$parser->get_text('/rpmdescription'); $parser->get_tag('/rpmdescription'); - $text=~s/\n//g; - $text=~s/\\n/\n/g; if ($mode eq 'html') { + $text=~s/\n//g; + $text=~s/\\n/\n/g; return $rpmdescription="\nDescription : $text"; } elsif ($mode eq 'text') { + $text=~s/\n//g; + $text=~s/\\n/\n/g; return $rpmdescription="\nDescription : $text"; } else {