VERSION=211122
 if test -z $1
 then 
 echo "htmlman.sh version $VERSION" 
 echo "Usage: htmlman <manual> or ./htmlman.sh <manual>"
 exit -1
 fi
 pwd > pwd.txt
 if cat pwd.txt | grep ~/Annexer
 then Workdir=~/Annexer
 elif cat pwd.txt | grep ~/Add_appendix
 then Workdir=~/Add_appendix
 else echo "Workind directory not found"
 exit -1
 fi
 rm pwd.txt
 source $Workdir/vars/installdir.var
 if test -z $Mandir
 then Mandir=$Installdir/man
 fi
 if test -z $Sbindir
 then Sbindir=$Installdir/sbin
 fi
 echo "Manuals directories = $Mandir"
 echo "Sbindir = $Sbindir"
 if echo $LANG | grep es
 then 
 Mylang=es
 echo "Mi idioma retenido es '$Mylang' "
 echo "Puedes escribir 'alias htmlman=\"$Sbindir/htmlman\"' en una consola " 
 elif echo $LANG | grep fr
 then Mylang=fr
 echo "Ma langue retenue est '$Mylang' "
 echo "Vous pouvez taper 'alias htmlman=\"$Sbindir/htmlman\"' dans une console"
 else
 if echo $LANG | grep en
 then Mylang=en
 echo "My retained language is '$Mylang' "
 echo "You can type 'alias htmlman=\"$Sbindir/htmlman\"' in a terminal"
 fi
 fi
 if test -e $Mandir/$Mylang/man1/$1.html
 then 
 echo "$Mandir/$Mylang/man1/$1.html exist"
 xdg-open $Mandir/$Mylang/man1/$1.html&
 elif test -e $Mandir/man1/$1.html
 then
 echo "$Mandir/man1/$1.html exist"
 xdg-open $Mandir/man1/$1.html&
 else
 echo "$1.html is not found in user man pages. Attempt in the general manual"
 # Version navigateur
 man2html /usr/share/man/man1/$1.1.gz > $1.html
 xdg-open $1.html&
 sleep 2
 rm $1.html
 fi

Auto-éditer un wikilivre/Annexer (Version internationalisée)/textman.sh

VERSION=211122
 if test -z $1
 then 
 echo "textman.sh version $VERSION" 
 echo "Usage: textman <manual> or ./textman.sh <manual>"
 exit -1
fi
 pwd > pwd.txt
 if cat pwd.txt | grep ~/Annexer; then Workdir=~/Annexer; elif cat pwd.txt | grep ~/Add_appendix; \
 then Workdir=~/Add_appendix; else echo "Workind directory not found"; exit -1;fi
 rm pwd.txt
 source $Workdir/vars/installdir.var
 if test -z $$Mandir
 then Mandir=$Installdir/man
 fi
 if test -z $Sbindir
 then Sbindir=$Installdir/sbin
 fi
 if echo $LANG | grep es
 then 
 Mylang=es
 echo "Mi idioma retenido es '$Mylang' "
 echo "Puedes escribir 'alias textman=\"$Sbindir/textman\"' en una consola " 
 elif echo $LANG | grep fr
 then Mylang=fr
 echo "Ma langue retenue est '$Mylang' "
 echo "Vous pouvez taper 'alias textman=\"$Sbindir/textman\"' dans une console"
 else 
 if echo $LANG | grep en
 then Mylang=en
 echo "My retained language is '$Mylang' "
 echo "You can type 'alias textman=\"$Sbindir/textman\"' in a terminal"
 fi
 fi
 if test -e "$Mandir/$Mylang/man1/$1.txt"
 then 
 echo "$Mandir/$Mylang/man1/$1.txt exist"
 yelp man:$Mandir/$Mylang/man1/$1.txt&
 elif test -s $Mandir/man1/$1.txt
 then
 echo "$Mandir/man1/$1.txt exist"
 yelp man:$Mandir/man1/$1.txt&
 else
 echo "$1.txt is not found in user man pages. Attempt in the general manual"
 man /usr/share/man/man1/$1.1.gz > $1.txt
 yelp ./$1.txt&
 sleep 1
 rm $1.txt
 #yelp man:$1.1.gz& #Version 
 fi

Auto-éditer un wikilivre/Annexer (Version internationalisée)/userman.sh

VERSION=211122
 if test -z $1
 then 
 echo "userman.sh version $VERSION" 
 echo "Usage: userman <manual> or ./userman.sh <manual>"
 exit -1
fi
 pwd > pwd.txt
 if cat pwd.txt | grep ~/Annexer
 then Workdir=~/Annexer
 elif cat pwd.txt | grep ~/Add_appendix
 then Workdir=~/Add_appendix
 else echo "Workind directory not found"
 exit -1
 fi
 rm pwd.txt
 source $Workdir/vars/installdir.var
 if test -z $$Mandir
 then Mandir=$Installdir/man
 fi
 if test -z $Sbindir
 then Sbindir=$Installdir/sbin
 fi
 if echo $LANG | grep es
 then 
 Mylang=es
 echo "Mi idioma retenido es '$Mylang' "
 echo "Puedes escribir 'alias userman=\"$Sbindir/userman\"' en una consola "
 elif echo $LANG | grep fr
 then Mylang=fr
 echo "Ma langue retenue est '$Mylang' "
 echo "Vous pouvez taper 'alias userman=\"$Sbindir/userman\"' dans une console"
 else 
 if echo $LANG | grep en
 then Mylang=en
 echo "My retained language is '$Mylang' "
 echo "You can type 'alias userman=\"$Sbindir/userman\"' in a terminal"
 fi
 fi
 if test -e "$Mandir/$Mylang/man1/$1.1.gz"
 then 
 echo "$Mandir/$Mylang/man1/$1.1.gz exist"
 yelp man:$Mandir/$Mylang/man1/$1.1.gz&
 elif test -s $Mandir/man1/$1.1.gz
 then
 echo "$Mandir/man1/$1.1.gz exist"
 yelp man:$Mandir/man1/$1.1.gz&
 else
 echo "$1.1.gz is not found in user man pages. Attempt in the general manual"
 # Version texte pour gedit
 if test -e /usr/share/man/man1/$1.1.gz
 then
 man /usr/share/man/man1/$1.1.gz > $1.txt; yelp $1.txt; rm $1.txt
 else
 echo "/usr/share/man/man1/$1.1.gz is not found"
 fi
 # Version console :
 # man /usr/share/man/man1/$1.1.gz
 # Versions aide
 # yelp man:$1.1.gz& 
 # xdg-open "man:$1.1.gz&"
 fi

Auto-éditer un wikilivre/Annexer (Version internationalisée)/findversions.sh

VERSION=211124
if [ "$1" = "--v" ]; then echo "findversions.sh version $VERSION"; exit 0; fi
if test -z $1; then echo "Syntax: findversions <dir> [ ? | --v ]"; exit -1; fi
if [ "$1" = "?" ]; then echo "Syntax: findversions <src_dir> [ ? | --v ]"; echo "Example: 'cd ~/Add_appendix/src; findversions .'"; exit 0; fi
 Pwd=$PWD
 cd $1; ls -1 *.sh | grep -v ".txt\|.list" > src_files.list
 rm SRCFILES_VERSIONS src_versions.txt src_versions2.txt
 echo "$PWD/SRCFILES_VERSIONS" > SRCFILES_VERSIONS
 echo > src_versions.txt 
 while read line
 do
 echo -n "$line: " » src_versions.txt
 cat $line | grep VERSION | grep -v "echo\|unset\|FILES" » src_versions.txt
 echo
 done < src_files.list
 cat src_versions.txt | sed "s/.\//\n/g" > src_versions2.txt
 echo "Create SRCFILES_VERSIONS.txt in '$1' directory"
 grep '\S' src_versions2.txt » SRCFILES_VERSIONS
 rm *.txt *.list
 cd $Pwd
 if test -d "$1/../../sbin"; then cd $1/..; rm BINFILES_VERSIONS; ls -1 | grep -v ".txt\|.list\|src\|.sh" > sbin_files.list; BINFILES=sbin_files
 elif test -d "$1/../bin"; then cd $1/../bin; rm BINFILES_VERSIONS; ls -1 | grep -v "README\|.txt" > bin_files.list; BINFILES=bin_files
 else echo "Bin file not found to create BINFILES_VERSIONS"
 fi
 echo "----"
 echo "$BINFILES.list selected"
 rm BINFILES_VERSIONS $BINFILES.versions.txt $BINFILES.versions2.txt
 echo "$PWD/BINFILES_VERSIONS" > BINFILES_VERSIONS
 echo > $BINFILES.versions.txt 
 while read line
 do
 echo -n "$line: " » $BINFILES.versions.txt
 cat $line | grep VERSION | grep -v "echo\|unset\|FILES" » $BINFILES.versions.txt
 echo
 done < $BINFILES.list
 cat $BINFILES.versions.txt | sed "s/.\//\n/g" | grep -v "src\n" > $BINFILES.versions2.txt
 echo "Create $BINFILES BINFILES_VERSIONS"
 grep '\S' $BINFILES.versions2.txt » BINFILES_VERSIONS
 #rm *.list *.txt
 cd $Pwd

Auto-éditer un wikilivre/Annexer (Version internationalisée)/docu2html.sh