Subversion Repositories wimsdev

Rev

Rev 11931 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. #!/usr/bin/perl
  2. ## create the file public_html/bases/sys/css_classes from the css of public_html/themes/standard
  3. ## use in documentation
  4. use warnings;
  5. use strict;
  6. #use Text::Balanced qw (extract_bracketed extract_tagged);
  7.  
  8. my $dir="public_html/themes/_css";
  9. my $outfile="public_html/bases/sys/css_classes";
  10. my $TEXT=" ";###generated by bin/css.pl - do not change by hand \n;
  11. my $file='utilities.css' ;
  12. ##$TEXT  .= "\n!!generated from file : $file\n";
  13. my $text=treate_file("$dir/$file");
  14. $TEXT .= "\n$text";
  15. out($outfile, $TEXT) ;
  16.  
  17. sub treate_file { my ($file)=@_;
  18.   my $test=0; my $text="";
  19.   open(IN, $file) ;
  20.   while(<IN>) {
  21.     my $line = $_;
  22.     next if !($line =~ /\/*\s*@/) ;
  23.     $line =~ s,\/\*\s*@,,g ;
  24.     $line =~ s,\*\/,,g ;
  25.     $text .= $line ;
  26.   }
  27.   close(IN);
  28.   $text
  29. }
  30. sub out { my ($bloc, $text) = @_;
  31.   open  (OUT, ">$bloc") ;
  32.   print OUT $text ; close OUT;
  33. }
  34.