Subversion Repositories wimsdev

Rev

Rev 11930 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11931 schaersvoo 1
#!/usr/bin/perl
4835 bpr 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
 
11176 bpr 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";
6024 bpr 16
 out($outfile, $TEXT) ;
4835 bpr 17
 
6024 bpr 18
sub treate_file { my ($file)=@_;
11709 bpr 19
 my $test=0; my $text="";
11176 bpr 20
 open(IN, $file) ;
11709 bpr 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
11176 bpr 30
}
4835 bpr 31
sub out { my ($bloc, $text) = @_;
32
  open  (OUT, ">$bloc") ;
33
  print OUT $text ; close OUT;
11176 bpr 34
}