Subversion Repositories wimsdev

Rev

Rev 11930 | Go to most recent revision | 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.  
  9.  my $dir="public_html/themes/_css";
  10.  my $outfile="public_html/bases/sys/css_classes";
  11.  my $TEXT=" ";###generated by bin/css.pl - do not change by hand \n;
  12.  my $file='utilities.css' ;
  13.  ##$TEXT  .= "\n!!generated from file : $file\n";
  14.  my $text=treate_file("$dir/$file");
  15.  $TEXT .= "\n$text";
  16.  out($outfile, $TEXT) ;
  17.  
  18. sub treate_file { my ($file)=@_;
  19.  my $test=0; my $text="";
  20.  open(IN, $file) ;
  21.   while(<IN>) {
  22.     my $line = $_;
  23.     next if !($line =~ /\/*\s*@/) ;
  24.     $line =~ s,\/\*\s*@,,g ;
  25.     $line =~ s,\*\/,,g ;
  26.     $text .= $line ;
  27.  }
  28.  close(IN);
  29.  $text
  30. }
  31. sub out { my ($bloc, $text) = @_;
  32.   open  (OUT, ">$bloc") ;
  33.   print OUT $text ; close OUT;
  34. }
  35.