Subversion Repositories wimsdev

Rev

Rev 11931 | 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
 
13026 obado 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) ;
11176 bpr 16
 
6024 bpr 17
sub treate_file { my ($file)=@_;
13026 obado 18
  my $test=0; my $text="";
19
  open(IN, $file) ;
11709 bpr 20
  while(<IN>) {
21
    my $line = $_;
22
    next if !($line =~ /\/*\s*@/) ;
23
    $line =~ s,\/\*\s*@,,g ;
24
    $line =~ s,\*\/,,g ;
25
    $text .= $line ;
13026 obado 26
  }
27
  close(IN);
28
  $text
11176 bpr 29
}
4835 bpr 30
sub out { my ($bloc, $text) = @_;
31
  open  (OUT, ">$bloc") ;
32
  print OUT $text ; close OUT;
11176 bpr 33
}