users_install_annex.sh.
 clear
 unset $VERSION
 VERSION=211101
 if [ "$1" = "--v" ]; then echo "Version of users_install_annex.sh "$VERSION; exit 0; fi
 if [ "$1" = "?" ]
 then 
 if test -z $Workdir/doc/users_install_annex.sh.doc 
 then cat $Workdir/doc/users_install_annex.sh.doc
 else echo "Syntax : $0 [ --v | ? | Add_appendix | Annexer ]"
 fi
 exit 0
 fi
 if [ -z $1 ] 
 then
 echo "Copy users_install_annex.sh in ~/Tmp directory"
 echo "Syntax ~/Tmp/users_install_annex.sh [ --v | ? | Add_appendix | Annexer ]"; exit 0
 fi
 if [ $USER = "root" ]; then echo "USER = $USER"; echo "Do not use 'sudo' please."; exit -1; fi
 cd ~
 echo; echo -n "current directory = "; pwd; echo
 if [ $1 ];
 then 
 if [ "$1" = "Annexer" ]; then Installdir=~/Annexer; echo "Installdir = "$Installdir
 elif [ "$1" = "Add_appendix" ]; then Installdir=~/Add_appendix; echo "Installdir = "$Installdir
 else echo "Syntax error ! "
 echo "Copy users_install_annex.sh in ~/Tmp directory"
 echo "Syntax ~/Tmp/users_install_annex.sh [ --v | ? | Add_appendix | Annexer ]"
 exit -1
 fi
 fi
 if [ -d $Installdir ];
 then echo " is ok, $Installdir is present."
 else echo " $Installdir not exist, i create it"; mkdir $Installdir;
 fi 
 if [ $1 = "Add_appendix" ] && [ $1 != "Annexer" ]; then Workdir=~/Add_appendix; echo "Workdir = "$Workdir; fi
 if [ $1 = "Annexer" ] && [ $1 != "Add_appendix" ]; then Workdir=~/Annexer; echo "Workdir = "$Workdir; fi
 if [ -d $Workdir ]; then echo " $Workdir is present."; else echo " $Workdir is not present, i create it."; mkdir $Workdir; fi
 Bindir="$Installdir/bin"; echo "Bindir : "$Bindir 
 if test -d $Bindir
 then echo " is ok." 
 else echo " not present, create it"; mkdir $Bindir 
 fi
 cd $Workdir
 echo -n "The current directory to create $Workdir sub directories = "; pwd
 mkdir bin books datas lib lib/src sbin sbin/src share src temp tests vars
 ln -s share/man man
 cd $Workdir/tests
 echo "$Workdir/tests is the current directory to create sub tests directories."; pwd
 mkdir 00-install_annex 01-sbsrc 02-manuels 0-pre-annex.sh 1-annex.lib 2-annex.sh 3-header.inc.sh 4-list.sh 5-download.sh 6-add_sclt.sh
 mkdir 7-scli.inc.sh 8-add_sclic.sh 9-add_sclipco.sh 10-add_sclipwb.sh 11-annexer.sh 12-add_appendix.sh
 cd $Workdir/tests
 cd $Workdir/share
 echo "$Workdir/share is the current directory to create sub share directories."; pwd
 mkdir man doc doc/html 
 mkdir -p addappendix addappendix/resources
 cd addappendix/resources
 rm $Workdir/vars/installdir.var
 echo "Installdir=$Installdir" > $Workdir/vars/installdir.var
 echo "Workdir=$Workdir" » $Workdir/vars/installdir.var 
 echo; echo "Content of file $Workdir/vars/installdir.var"
 cat $Workdir/vars/installdir.var
 if [ "$1" = "Annexer" ]
 then 
 echo; echo "First param = $1"
 echo; echo "Se connecter à l'url :"
 echo "https://fr.wikibooks.org/wiki/Autoéditer_un_wikilivre/Annexer_(Version_internationalisée)#src.orig_en_français"
 echo "Copier les pages de codes, les coller dans un éditeur de texte et les enregistrer dans les répertoires spécialisés"
 echo "Les fichiers : "
 echo " sources, dans le répertoire $1/src"
 echo " de données dans $1/datas"
 echo " de librairies, dans $1/lib"
 echo " d'exécutables de maintenance, dans $1/sbin (chmod 755 * dans sbin)"
 echo " de documentation dans $1/share/doc"
 echo " de manuels dans $1/share/man"
 echo "Utiliser cette version imprimable : "
 echo " https://fr.wikibooks.org/wiki/Auto-éditer_un_wikilivre/Annexer_(Version_internationalisée)/Version_imprimable"
 echo " pour copier les codes bash"
 echo; echo "Finalement ré-exécuter cette commande ~/Annexer/sbin/users_install_annex.sh"
 fi
 if [ "$1" = "Add_appendix" ] 
 then 
 echo; echo "First param = $1"
 echo; echo "Login to url :"
 echo "https://fr.wikibooks.org/wiki/Autoéditer_un_wikilivre/Annexer_(Version_internationalisée)#Codes_sources_(internationalized_source_code)"
 echo "Copy code pages in memory, paste them in a text editor and save in the specialized directory"
 echo "The files :"
 echo " sources in the directory Add_appendix/src"
 echo " datas in Add_appendix/datas"
 echo " library in Add_appendix/lib"
 echo " executable for maintenance, in Add_appendix/sbin (chmod 755 * in sbin)"
 echo " documentation in Add_appendix/share/doc"
 echo " manuals in Add_appendix/share/man"
 echo "Use this printable version : " 
 echo " https://fr.wikibooks.org/wiki/Auto-éditer_un_wikilivre/Annexer_(Version_internationalisée)/Version_imprimable"
 echo " to copy the bash code"
 echo; echo "Finaly reexecute this command ~/Add_appendix/sbin/users_install_annex.sh"
 fi 
 echo
 Datasdir=$Workdir/datas; echo "Datadir = $Datasdir"
 Conversions=$Datasdir/conversions.dat; echo "Conversion file = $Conversions" 
 if test -e $Conversions
 then echo "The $Conversions file is present and will not be updated"
 else 
 echo "s/%24/\$/g;s/%21/\!/g;s/%25/%/g;s/%2B/+/g;s/%3C/\\\&lt\;/g;s/%3E/\&gt\;/g;" > $Conversions
 echo "s/%5C/\\\/g;s/%B0/°/g" » $Conversions
 echo "s/%E0/à/g;s/%E2/â/g" » $Conversions
 echo "s/%E8/è/g;s/%E9/é/g;s/%EA/ê/g;s/%EB/ë/g" » $Conversions
 echo "s/%EE/î/g;s/%EF/ï/g" » $Conversions
 echo "s/%F4/ô/g" » $Conversions
 echo "s/%F9/ù/g;s/%FB/û/g" » $Conversions
 echo "s/%25/%/g;" » $Conversions
 echo "s/%28/(/g;s/%29/)/g;" » $Conversions
 echo "s/%2B/+/g;" » $Conversions
 echo "s/%3A/:/g;" » $Conversions
 echo "s/%3D/=/g;" » $Conversions
 echo "s/%5B/[/g;" » $Conversions
 echo "s/%5D/]/g" » $Conversions
 echo "s/%3B/;/g;s/%2F/\//g;s/%27/'/g" » $Conversions
 echo 's/%22/"/g' » $Conversions
 echo "s/%C3%A7/ç/g;s/%E7/ç/g" » $Conversions
 echo "s/%C3%A0/à/g;s/%C3%A2/â/g" » $Conversions
 echo "s/%C3%A9/é/g;s/%C3%A8/è/g;s/%C3%AA/ê/g" » $Conversions
 echo "s/%C3%AE/î/g;s/%C3%AF/ï/g" » $Conversions
 echo "s/%C3%B4/ô/g" » $Conversions
 echo "s/%C3%B9/ù/g;s/%C3%BB/û/g" » $Conversions
 echo "s/%C2%B7/-/g;s/%C2%AB/«/g;s/%C2%BB/»/g" » $Conversions
 fi
 echo "----"
 Content_cleaner=$Datasdir/content_cleaner.dat 
 echo "Content_cleaner = $Content_cleaner"
 if test -e $Content_cleaner
 then echo "The $Content_cleaner file is present and will not be updated"
 else 
 echo "s/: \[/\[/g;s/:\[/\[/g" > $Content_cleaner
 echo "s/# \[/[/g;s/#\[/\[/g" » $Content_cleaner
 echo "s/* \[/[/g;s/*\[/\[/g" » $Content_cleaner
 echo "s/; /;/g" » $Content_cleaner
 fi
 echo "----" 
 Unrecognized_links=$Datasdir/unrecognized_links.dat
 echo "Unrecognized_links = $Unrecognized_links"
 #O If not exist create the content_cleaner.dat in datas directory
 if test -e $Unrecognized_links
 then echo "The $Unrecognized_links file is present and will not be updated"
 else
 echo "fr.wikibooks.org: unrecognized_link.dat ignore les liens non contenus dans les pages Résumé ou Sommaire"
 echo "title" > $Unrecognized_links
 echo "Spécial" » $Unrecognized_links
 echo "Accueil" » $Unrecognized_links
 echo "Vitrine" » $Unrecognized_links
 echo "Tous_les_livres" » $Unrecognized_links
 echo "Rechercher_un_livre" » $Unrecognized_links
 echo "Wikijunior" » $Unrecognized_links
 echo "Portail_communautaire" » $Unrecognized_links
 echo "Le_Bistro" » $Unrecognized_links
 echo "Special:" » $Unrecognized_links
 echo "Aide:Accueil" » $Unrecognized_links
 echo "propos_de" » $Unrecognized_links
 echo "https://fr.wikibooks.org/wiki/Wikilivres" » $Unrecognized_links
 echo "Wikilivres:" » $Unrecognized_links
 echo "Catégorie:" » $Unrecognized_links
 echo "en.wikibooks.org: unrecognized_link.dat ignore the uncontained Links in the Summary or Contents pages"
 echo "Main_Page" » $Unrecognized_links
 echo "Help:Contents" » $Unrecognized_links
 echo "Card_Catalog_Office" » $Unrecognized_links
 echo "Cookbook:Table_of_Contents" » $Unrecognized_links
 echo "Featured_books" » $Unrecognized_links
 echo "Using_Wikibooks" » $Unrecognized_links
 echo "Reading_room" » $Unrecognized_links
 echo "Community_Portal" » $Unrecognized_links
 echo "Reading_room/Bulletin_Board" » $Unrecognized_links
 echo "Maintenance" » $Unrecognized_links
 echo "Policies_and_guidelines" » $Unrecognized_links
 echo "Contact_us" » $Unrecognized_links
 echo "Welcome" » $Unrecognized_links
 echo "General_disclaimer" » $Unrecognized_links
 echo "Category:" » $Unrecognized_links
 fi
 echo "----" 
 if [ "$1" = "Add_appendix" ]
 then
 echo "*** Write bin/README file "
 echo "README to use bin directory" > $Workdir/bin/README
 echo "This directory is reserved for commands without a '.sh' file suffix." » $Workdir/bin/README
 echo "Commands without '.sh' are stripped of comments. They come from the" » $Workdir/bin/README 
 echo " 'src' directory or from the 'tests' subdirectories." » $Workdir/bin/README
 echo "Executables commands with or without '.sh', '.x' or '.exe' suffix are" » $Workdir/bin/README
 echo " commands for maintainers in 'sbin' directory" » $Workdir/bin/README
 echo "*** Write README in Add_appendix"
 echo "README file in ~/Add_apperdix" > $Workdir/README
 echo "Type ~/Add_appendix/bin/annex <bookname> to update the book" » $Workdir/README
 echo "Type ~/Add_appendix/bin/addappendix <full-url-bookname> to launch app" » $Workdir/README
 fi
 if [ "$1" = "Annexer" ]
 then
 echo "*** écriture du fichier bin/LISEZ-MOI"
 echo "LISEZ-MOI pour l'utilisation du répertoire 'bin'" > $Workdir/bin/LISEZ-MOI
 echo "Ce répertoire est réservé aux commandes shell sans l'extension '.sh'." » $Workdir/bin/LISEZ-MOI
 echo "Les commandes sans extension '.sh' proviennent du répertoire 'src'" » $Workdir/bin/LISEZ-MOI
 echo " ou des sous-répertoires des 'tests', dépouillées des commentaires." » $Workdir/bin/LISEZ-MOI
 echo "Les exécutables avec ou sans l'extension 'sh', '.x' ou '.exe' sont des" » $Workdir/bin/LISEZ-MOI
 echo " commandes pour les mainteneurs dans le répertoire 'sbin'" » $Workdir/bin/LISEZ-MOI
 echo "*** écriture du fichier LISEZ-MOI dans Annexer"
 echo "Fichier LISEZ-MOI dans ~/Annexer" > $Workdir/LISEZ-MOI
 echo "Taper ~/Annexer/bin/annex <nom-du-livre> pour mettre le livre à jour" » $Workdir/LISEZ-MOI
 echo "Taper ~/Annexer/bin/annexer <url-complète-du livre> pour lancer l'app" » $Workdir/LISEZ-MOI
 fi
 if test -e $Installdir/bin/header.inc; then
 xgettext -L shell -o $Installdir/share/addapendix/resources/lang/po/header.inc.pot --from-code=UTF-8 $Installdir/bin/header.inc; fi
 if test -e $Installdir/bin/annex; then
 xgettext -L shell -o $Installdir/share/addapendix/resources/lang/po/annex.pot --from-code=UTF-8 $Installdir/bin/annex; fi
 if test -e $Installdir/bin/annexer; then
 xgettext -L shell -o $Installdir/share/addapendix/resources/lang/po/annexer.pot --from-code=UTF-8 $Installdir/bin/annexer; fi
 if test -e $Installdir/bin/addappendix; then
 xgettext -L shell -o $Installdir/share/addapendix/resources/lang/po/addappendix.pot --from-code=UTF-8 $Installdir/bin/addappendix; fi 
 echo "-----" 
 echo -e "\033[1;33mYou find Pot-files in $Workdir/share/locale for translations with 'Poedit':\033[0m"
 ls -R $Workdir/share/locale
 echo -e "\033[1;33mWhen you run this script again, the message translation .pot files will be updated.\033[0m"
 cp -u ~/Tmp/users_install_annex.sh $Workdir/sbin/src/.
 cp -u ~/Tmp/users_uninstall_annex.sh $Workdir/sbin/src/.
 if test -e $Workdir/sbin/src/users_install_annex.sh; then cat $Workdir/sbin/src/users_install_annex.sh | grep -e "M" | sed 's/#M //g' > $Workdir/share/addappendix/resources/man/users_install_annex_en.1; fi
 if test -e $Workdir/sbin/users_install_annex.sh; then cat $Workdir/sbin/users_install_annex.sh | grep -e "#D" | grep -v "if test" | sed 's/#D//g' > $Workdir/share/doc/users_install_annex.sh.doc; fi
 if test -d ~/tmp; then rm -r ~/tmp; fi
 exit 0
test_users_install_annex.sh.
 clear
 unset $VERSION
 VERSION=210728
 if [ "$1" = "--v" ]; then echo "Version of test_users_install_annex.sh "$VERSION; exit 0; fi
 if [ "$1" = "?" ]
 then 
 echo "~/Tmp/test_users_install_annex.sh [ --v | ? | Annexer | Add_appendix ]"; exit 0
 fi
 if [ "$0" != "~/Tmp/test_users_install_annex.sh" ] || [ -z $1 ]
 then
 echo "Copy test_users_install_annex.sh in ~/Tmp directory"
 echo "Syntax ~/Tmp/test_users_install_annex.sh [ --v | ? | Add_appendix | Annexer ]"
 fi
 ~/Tmp/users_install_annex.sh
 sleep 10
 ~/Tmp/users_install_annex.sh --v
 sleep 10
 ~/Tmp/users_install_annex.sh ?
 sleep 10
 ~/Tmp/users_install_annex.sh Annexer
 echo "Contenu du répertoire Annexer :" 
 ls -al ~/Annexer
 echo "Contenu des sous-répertoires"
 ls -al ~/Annexer/lib ~/Annexer/lib/src ~/Annexer/sbin ~/Annexer/share/doc ~/Annexer/vars
 exit 0
 ~/Tmp/users_install_annex.sh Add_appendix
 echo "Add_appendix directory :"
 ls -al ~/Add_appendix
 echo "Contents of sub-directories :"
 ls -al ~/Add_appendix/lib ~/Add_appendix/lib/src ~/Add_appendix/sbin ~/Add_appendix/share/doc ~/Add_appendix/vars
 exit 0 
users_uninstall_annex.sh.
 clear
 unset $VERSION
 VERSION=210726
 if [ "$1" = "--v" ]; then echo "Version of users_uninstall_annex.sh "$VERSION; exit 0; fi
 if [ "$1" = "?" ]
 then 
 if test -z $Workdir/doc/users_uninstall_annex.sh.doc 
 then cat $Workdir/doc/users_install_annex.sh.doc
 else echo "Syntax : ~/Tmp/users_uninstall_annex.sh [ --v | ? | Add_appendix | Annexer ]"
 fi
 exit 0
 fi
 if [ "$0" != "~/Tmp/users_uninstall_annex.sh" ] || [ -z $1 ]
 then
 echo "Copy users_uninstall_annex.sh in ~/Tmp directory"
 echo "Syntax ~/Tmp/users_uninstall_annex.sh [ --v | ? | Add_appendix | Annexer ]"; exit 0
 fi
 if [ "$1" == "Annexer" ]; then source ~/Annexer/vars/installdir.var
 elif [ "$1" == "Add_appendix" ]; then source ~/Add_apendix/vars/installdir.var
 else echo "installdir.var is not found. see syntax of users_uninstall_annex.sh program."; exit -1
 fi
 if test -d $Installdir; then rm -R $Installdir; else echo "$Installdir not found"; fi
uploadfromTmp.sh.
cp -u ~/Tmp/*install_annex.sh .
cp -u ~/Tmp/*unintall_annex.sh .
ls -al .