#!/bin/sh
# shell to make html for HELP config files
USAGE="$0 [file in stta/dataconf ]"

[ $# = 0 ] && echo "$USAGE" && exit 1 
BaseDef="$STTA/dataconf/base"
if [ -e $BaseDef/$1 ] ;
then
	    file=$BaseDef/$1 
else
    echo "$1 no exite "
    exit 1 
fi
OutBase="$STTA/help/es/config";
cat $file | while read line ; 
do
   variable=`echo $line | cut -f1 -d= `
   value=`echo $line | cut -f2 -d= `
   echo "<sectionCfg $1> " > $OutBase/$variable.html
   echo "<a name=\"$variable\"></a> " >> $OutBase/$variable.html
   echo "<br> " >> $OutBase/$variable.html
   echo "<ul> " >> $OutBase/$variable.html
   echo "<!--    " >> $OutBase/$variable.html
   echo "    <li>Admite los valores: </li> " >> $OutBase/$variable.html
   echo "    <li><b></b></li> " >> $OutBase/$variable.html
   echo "    <li> <b>STTA</b>  <exec &hlink('','')>.</li> " >> $OutBase/$variable.html
   echo "    <li>%W%  <exec &hlink('','')>.</li> " >> $OutBase/$variable.html
   echo "-->    " >> $OutBase/$variable.html
   echo "</ul> " >> $OutBase/$variable.html
   echo "<br> " >> $OutBase/$variable.html
   echo "Generando $OutBase/$variable.html ... "
#  echo "<li><b>\$infoCfg{$variable}</b> ($variable) <br>"
#  echo "       <include %LANG%/config/$variable> </li>"
#  echo "       &nbsp; &nbsp; $variable $value "
#  echo "&nbsp;&nbsp;\$infoCfg{$variable} ($variable) -- $value <br>" > $STTA/help/es/config/$variable.html
done
