Subversion Repositories wimsdev

Rev

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