summaryrefslogtreecommitdiff
path: root/helpers/calc_text_func.pl
blob: 994d3d793bd0f45b629ee5c25011d8d0c5e4254f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

use 5.010;

$hlp='helpers/calc_text_func.xsl';    #extract section
$hlp0='helpers/calc_text_func0.xsl';  #replace section

$source= 'source/text/scalc/01/04060110.xhp';
$tmp = $source . '.tmp';

@todo = qw/  LEFTB LENB MIDB RIGHTB /;


for $F ( @ARGV) {
  $f=lc $F;
  say $F

  $fOut = "source/text/scalc/01/func_$f.xhp";
  system qq( xsltproc --stringparam func $F  $hlp  $source > $fOut );

  if ( -z $fOut ) {
    warn "$F empty";
    unlink $fOut;
    next;
  }

  system qq( xsltproc --stringparam func $f  $hlp0 $source > $tmp );
  rename $tmp, $source;

  $mk .= qq(    helpcontent2/source/text/scalc/01/func_$f \\\n);
}

say qq(TODO. add to git and  AllLangHelp_scalc.mk :
$mk)
  if $mk;