« Auto-éditer un wikilivre/Annexer (Version internationalisée)/src/add sclt.sh » : différence entre les versions

Un livre de Wikilivres.
Contenu supprimé Contenu ajouté
m →‎tests_add_sclt.bash : Ajout d'une section de résultats
m →‎See results : mise à jour
Ligne 467 : Ligne 467 :
{{AutoCat}}
{{AutoCat}}


== See results ==
=== LivreTest ===
{{/LivreTest.sclt}}

=== TestBook ===
{{/TestBook.sclt}}


{{AutoCat}}
{{AutoCat}}

Version du 14 juin 2021 à 15:15

add_sclt.sh

cette commande se décompose en un programme principal et des sous programmes en français et en anglais d'autres langues peuvent s'ajouter en fonction des livres de sites wikibooks autres que français et anglais

#! /bin/bash
#HF Fichier : add_sclt.sh
#HF Nom du fichier de commandes : add_sclt
#HF Syntaxe : "add_sclt <nom du livre> [ --t ]"
#HF Exemple : "./add_sclt LivreTest --t" à la console.
#HF Date de création : 12 avril 2020
#HF Modifié le : par GC le 1er mai 2020
#HF Modifié le : par GC pour l'installation automatique.
#HF Adapté le 28 mai 2021 pour la version Add_appendix
#HF Version de la documentation sur WikiLivres le : 30 avril 2020
#HF
#HF LES FICHIERS DE COMMANDES 
#HF
#HF## header.sh ##############
#HF header.sh, a créé le répertoire des commandes si celui-ci ne préexistait pas
#HF   il a vérifié la validité ou invalidé de ligne de commande, initialisé
#HF   les variables $Projet, $Site, $SitePrefix, vérifié l'existence des
#HF   fichiers de liste "$Projet/$1".list et "$Projet/$1".prj, puis affiché le
#HF   contenu du répertoire de travail.
#HF
#HF## lister #################
#HF lister a créé le fichier de liste $Projet/$1.list par l'extraction du fichie
#HF   fichier $Projet/$1.contenu, copie de la page "Contenus" de la version
#HF   imprimable du livre, ou du fichier $Projet/$1.compilé issu d'une
#HF   compilation destinée à la publication par PediaPress.
#HF   il crée aussi le fichier $Projet/$1.prj qui conserve l'ordre d'affichage
#HF de la publication.
#HF
#HF## télécharger ############
#HF la commande aura téléchargé toutes les page du livre et aura copié les pages
#HF   html dans des répertoires qui leurs sont dédiés pour y extraire toute la
#HF   documentation nécessaire à la création de la page "Annexe" du livre.
#w      à ce stade, pour les tests; on dispose des répertoires de travail :
#w      LivreTest, ArticleUn, ArticleDeux, ArticleTrois 
#HF   qui contiennent chacun le fichier html de la page ou de l'article qui le
#HF   concerne.
#HF   L'ensemble de commandes aura créé les fichiers de listes :
#HF   $Projet/$1.dirs, $Projet/$1.list, $Projet/$1.mainPage, $Projet/$1.prj
#HF
#DF La commande ./add_sclt <wikilivre> commence par créer la page
#DF   $Projet/$1.sclt comme elle apparaîtra dans la première partie de la page
#DF   "Annexe" du livre avec les titre en wikitexte et les sections :
#DF   Références: toutes celles qui n'ont pas été affichées dans les pages.
#DF   Contenus: liens établis vers la page du livre et les articles (sous-pages)
#DF   Source de l'édition: lien vers la page qui a permis de créer l' "Annexe".
#DF   Sources licences et contributeurs des articles: ne concerne que les
#DF   articles, les sous-pages.
#DF
#DE the command ./add_sclt <Wiki-book>[--t], first create the page 
#DE   $ Project / $ 1.sclt as it will appear in the "Appendix" page with the 
#DE   titles and Wikitext sections:
#DE   References : all references not referenced in articles
#DE   Contents : links to book articles
#DE   Sources of the edition : link to the page that allows you to create the
#DE     annex page
#DE   Licenses sources and article contributors : only articles and sub-pages
#DE

VERSION=210606
#O . gettext.sh for translation
   . gettext.sh
if [ "$0" = "./add_sclt" ]; then echo "add_sclt : Version "$VERSION; fi
#O Include the file header.inc
    if test -e ~/Add_appendix/bin/header.inc; then source ~/Add_appendix/bin/header.inc
    else echo "$Bindir/header.inc not found. Execute sbin/cp-src2bin.sh"; exit -1
    fi
#O Create variable PageSclt
    Projectdir=$Workdir/books/$1
    PageSclt="$Projectdir/$1.sclt"
    echo $PageSclt
    if [ "$2" = "--t" ]; then pwd > pwd.txt; read Localdir < pwd.txt; rm pwd.txt; else Localdir=$Bindir; fi
    if [ "$Site" = "en.wikibooks.org" ]; then source $Localdir/en_sclt.inc
    elif [ "$Site" = "fr.wikibooks.org" ]; then source $Localdir/fr_sclt.inc
    else echo "$Localdir/sclt.inc not found for $Site"; exit -1
    fi

fr_sclt.inc

#! /bin/bash
#H Fichier : fr_sclt.inc pour ajouter à add_sclt.sh
#H Version du 10 juin 2021
cd $Projectdir
#T echo "Projectdir : $Projectdir" exit 0
#O but final: créer la page "Annexe" avec les pages Projet.sclt et Projet.scli.
#O ---
#O Créer la page PageSclt=$Projectdir/$1.sclt et afficher son contenu.
echo "créer la page $Projectdir/$1.sclt"
echo "----------"
echo "= Annexe =" > "$Projectdir/$1.sclt"
echo "" >> $Projectdir/$1.sclt

#O Ajouter la balise <references />
echo "== Références ==" >> "$PageSclt"
echo "<references />" >> "$PageSclt"
echo " "  >> "$PageSclt"
echo "{{Nouvelle page imprimée}}" >> "$PageSclt"

#? (option) ajouter la liste créée avec la page "Contenus" de la version imprimable ou la page compilée ?
#O ajouter le lien vers : la page du livre imprimable, et vers les articles.
echo "== Contenus ==" >> $PageSclt
echo "<div style="font-zize:85%";>" >> $PageSclt
cat $Projectdir/$1".list" | tr ' ' '_' | tr '\n' '%' | sed "s/%/\n\n/g" >> $PageSclt
echo "</div>" >> $PageSclt

#0 Ajouter lien vers la source de cette édition.
echo "=== Source de cette édition ===" >> $PageSclt
echo "<div style="font-zize:85%";>" >> $PageSclt
echo -n "https://" >> $PageSclt
cat $Projectdir/$1.mainPage | sed "s/\\\ /_/g" >> $PageSclt
#P Autre version : cat $Projectdir/$1".list" | tr ' ' '_' | tr '\n' '%' | sed "s/%/%\n/g" | grep $1% | tr -d % >> $PageSclt
echo "</div>" >> $PageSclt
echo " "  >> $PageSclt
echo "{{Nouvelle page imprimée}}" >> $PageSclt

#O Créer la section 'Article', 'Source', 'licence', 'Contributeur(?)'
echo "== Sources licences et contributeurs des articles ==" >> $PageSclt
#O   ajouter le texte : style PediaPress ou personnalisé.
#O   Les ''sources'' listées pour chaque article fournissent des informations
#O   de licence plus détaillées, y compris le statut des droits d'auteurs, les
#O   détenteurs de ces droits et les conditions de licence.
echo "<span style="font-zize:85%";>Les ''sources'' listées pour chaque article fournissent des informations de licence plus détaillées, y compris le statut des droits d'auteurs, les détenteurs de ces droits et les conditions de licence.</span>" >> $PageSclt
#O ou, valider l'un ou l'autre de ces textes : 
#O   Les textes sont disponibles avec leurs licences respectives, cependant
#O   d’autres termes peuvent s’appliquer.<br />
#O   Voyez les termes d’utilisation pour plus de détails :<br /> 
#O   https://wikimediafoundation.org/wiki/Conditions_d'utilisation
# echo "<span style="font-zize:85%";>Les textes sont disponibles avec leurs licences respectives, cependant d’autres termes peuvent s’appliquer.<br />Voyez les termes d’utilisation pour plus de détails :<br />https://wikimediafoundation.org/wiki/Conditions_d'utilisation.</span>" >> $PageSclt
echo " " >> $PageSclt
echo "<div style="font-zize:72%";>" >> $PageSclt

#T exit 0
#T echo -n "Répertoire courant : "
#T pwd
echo "----------"
#O Créer ou recréer le fichier de liste $Projectdir/$1.pj
cat $Projectdir/$1.list | awk -F"/" '{ print $NF }' > $Projectdir/$1.pj
Liste=$Projectdir/$1.pj
echo "Fichier de liste : "$Liste
#T exit 0

#O Tant qu'il y a des lignes dans le fichier de liste,
    while read ligne
    do    
#O    Afficher la ligne lue,
       echo ""
       echo "   ligne lue = "$ligne
       echo ""
#O    Extraire et copier toutes les chaînes de caractères du fichier html
#O      $ligne.html dans le fichier $ligne.str et les dupliquer à l'écran
#T pwd
       mkd -pws '**' "$ligne/$ligne.html" $Projectdir/$ligne/$ligne.tmp | tr ',' '\n' > $Projectdir/$ligne/$ligne.str
#T break
#O    Créer les fichiers de documentation des pages :
       echo "*** Références : articles, src, lic, contrib. "
    
#O    Article,
       if [ $ligne != $1 ]
       then  
         echo "'''"$ligne"'''" >> $PageSclt
       fi
       echo "'''"$ligne"'''" > $Projectdir/$ligne/$ligne.article
       cat $Projectdir/$ligne/$ligne.article
       
#O    Source,
       echo -n ", ''source : ''https://"$Site"/w/index.php?oldid=" > $Projectdir/$ligne/$ligne.RevisionId
       cat $Projectdir/$ligne/$ligne.str | grep -n -m 1 -i -e wgRevisionId | tr -d ':' | sed "s/\"/%/g" | cut -d'%' -f3 >> $Projectdir/$ligne/$ligne.RevisionId
       if [ $ligne != $1 ]
       then          
         cat $Projectdir/$ligne/$ligne.RevisionId  >> $PageSclt
       fi
       cat $Projectdir/$ligne/$ligne.RevisionId
       

#P    licence du bas de page : 
#P    <li id="footer-info-copyright">Les textes sont disponibles sous <a href="https://creativecommons.org/licenses/by-sa/3.0/">licence Creative Commons attribution partage à l’identique</a> ; d’autres termes peuvent s’appliquer.<br/>
#P      Voyez les <a href="https://wikimediafoundation.org/wiki/Conditions_d'utilisation">termes d’utilisation</a> pour plus de détails.<br/></li>
#P
#P    license :
#P    licence s'écrit license en anglais (langage de base en programmation).
#P    <link rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/"/>

#T echo ", ''Droits de copie :''"  >> ArticleUn.tmp
#T cat ArticleUn.str | grep -n -m 1 -i -e license | sed "s/\"\//%\//g" | cut -d'%' -f2 |sed "s/\/\//https:\/\//g"  >> ArticleUn.tmp
#O    Licence :
       echo -n ", ''licence : ''" > $Projectdir/$ligne/$ligne.license
    #T cat $Projectdir/$ligne/$ligne.str | grep -n -m 1 -i -e license | sed "s/\"\//%\//g" | cut -d'%' -f4 >> $Projectdir/$ligne/$ligne.license
       cat $Projectdir/$ligne/$ligne.str | grep -n -m 1 -i -e license | sed "s/\"\//%\//g" | tr '"' '%' | cut -d'%' -f4 >> $Projectdir/$ligne/$ligne.license
    #T cat $Projectdir/$ligne/$ligne.str | grep -n -m 1 -i -e license | sed "s/\"\//%\//g" | cut -d'%' -f2 | sed "s/\/\//https:\/\//g" >> $Projectdir/$ligne/$ligne.license
       if [ $ligne != $1 ]
       then  
         cat $Projectdir/$ligne/$ligne.license >> $PageSclt
       fi
       cat $Projectdir/$ligne/$ligne.license
       #
       #P spécial pour bas de page fr ## 
       cat $Projectdir/$ligne/$ligne.str | grep -n -m 1 -i -e footer-info-copyright | sed "s/\"\//%\//g" | tr '"' '%' | cut -d'%' -f4  > $Projectdir/$ligne/$ligne.licence

#O    Auteur(s).  
       echo -n ", ''auteur(s) : ''" > $Projectdir/$ligne/$ligne.auteur
       
       cat $Projectdir/$ligne/$ligne.str | grep -n -m 1 -i -e wgRelevantUserName | sed "s/\"/%/g" | cut -d'%' -f4 > tmp
       if test -s tmp; 
         then cat tmp >> $Projectdir/$ligne/$ligne.auteur; rm tmp;
         else 
           echo "Auteur non trouvé ! " >> $Projectdir/$ligne/$ligne.auteur
           if wget --spider https://xtools.wmflabs.org/articleinfo/en.wikibooks.org/$ligne 2>/dev/null
           then
             echo "  éditer : https://xtools.wmflabs.org/articleinfo/en.wikibooks.org/$ligne" >> $Projectdir/$ligne/$ligne.auteur
           elif wget --spider https://xtools.wmflabs.org/articleinfo/en.wikibooks.org/$Bookname/$ligne 2>/dev/null
           then 
             echo "  éditer : https://xtools.wmflabs.org/articleinfo/en.wikibooks.org/$Bookname/$ligne" >> $Projectdir/$ligne/$ligne.auteur
           else echo "  éditer ''contributeurs'' du livre ''$Bookname'' historique de la page ''$ligne''"  >> $Projectdir/$ligne/$ligne.auteur
           fi
       fi
       
       if [ $ligne != $1 ]
       then
         cat $Projectdir/$ligne/$ligne.auteur >> $PageSclt
         cat $Projectdir/$ligne/$ligne.auteur
       fi
       
       echo "" >> $PageSclt
       
#O fin du tant que.
    done < $Projectdir/$1.pj #< $Liste
    echo "</div>" >> $PageSclt
    echo "{{Nouvelle page imprimée}}" >> $PageSclt

    if [ "$2" = "--t" ]; then more $PageSclt; fi
    
exit 0
# Fin de fr_sclt.inc

en_sclt.inc

#! /bin/bash
#H File : en_sclt.inc to add at add_sclt.sh
#H Version 21-06-10
cd $Projectdir
#T echo "Projectdir : $Projectdir" exit 0
#O but final: créer la page "Annexe" avec les pages Projet.sclt et Projet.scli.
#O ---
#O Créer la page PageSclt=$Projectdir/$1.sclt et afficher son contenu.
echo "$Projectdir/$1.sclt creation"
echo "----------"
echo "= Appendix =" > "$Projectdir/$1.sclt"
echo "" >> $Projectdir/$1.sclt

#O Add <references />
echo "== References ==" >> "$PageSclt"
echo "<references />" >> "$PageSclt"
echo " "  >> "$PageSclt"
echo "{{Newpage}}" >> "$PageSclt"

#? (option) add the la list create with "Contents" page for printable book version or compiled page (collection) ?
#O add the link to printable book and to articles.
echo "== Contents ==" >> $PageSclt
echo "<div style="font-zize:85%";>" >> $PageSclt
cat $Projectdir/$1".list" | tr ' ' '_' | tr '\n' '%' | sed "s/%/\n\n/g" >> $PageSclt
echo "</div>" >> $PageSclt

#0 Add the link to the source of this edition.
echo "=== Source for this edition ===" >> $PageSclt
echo "<div style="font-zize:85%";>" >> $PageSclt
echo -n "https://" >> $PageSclt
cat $Projectdir/$1.mainPage | sed "s/\\\ /_/g" >> $PageSclt
#P other version : cat $Projectdir/$1".list" | tr ' ' '_' | tr '\n' '%' | sed "s/%/%\n/g" | grep $1% | tr -d % >> $PageSclt
echo "</div>" >> $PageSclt
echo " "  >> $PageSclt
echo "{{Newpage}}" >> $PageSclt

#O Create section 'Article', 'Source', 'License', 'Contributors(?)'
echo "== Articles Sources, and contributors ==" >> $PageSclt
#O   add the text : style PediaPress or personalized.
#O   The ''sources'' listed for each article provide more detailled licencing
#O   information including the copyright status, the copyleft owner and the license conditions.
echo "<span style="font-zize:85%";>The ''sources'' listed for each article provide more detailled licencing information including the copyright status, the copyleft owner and the license conditions..</span>" >> $PageSclt
#O or, validate one or the other of these texts : 
# echo "<span style="font-zize:85%";>The texts are available with their respective licenses, however other terms may apply.<br />See the terms of use for more details : <br />https://wikimediafoundation.org/wiki/Conditions_d'utilisation.</span>" >> $PageSclt
echo " " >> $PageSclt
echo "<div style="font-zize:72%";>" >> $PageSclt






#T exit 0
#T echo -n "Current directory : "
#T pwd
echo "----------"
#O Create or recreate the list-file $Projectdir/$1.pj
cat $Projectdir/$1.list | awk -F"/" '{ print $NF }' > $Projectdir/$1.pj
Pjlist=$Projectdir/$1.pj
echo "Pjlist : "$PjList
#T exit 0

#O While exist line in file $List ,
    while read line
    do    
#O    Print the line read,
       echo ""
       echo "   line read = "$line
       echo ""
#O    Extract and copy all strings from the fichier html file
#O      $line.html in the file $line.str and add to screen
#T pwd
       mkd -pws '**' "$line/$line.html" $Projectdir/$line/$line.tmp | tr ',' '\n' > $Projectdir/$line.str
#T break
#O    Create the documentation file of pages :
       echo "*** References : articles, src, lic, contrib. "
    
#O    Print article,
       if [ $line != $1 ]
       then  
         echo "'''"$line"'''" >> $PageSclt
       fi
       echo "'''"$line"'''" > $Projectdir/$line/$line.article
       cat $Projectdir/$line/$line.article
       
#O    Print source,
       echo -n ", ''source : ''https://"$Site"/w/index.php?oldid=" > $Projectdir/$line/$line.RevisionId
       cat $Projectdir/$line/$line.str | grep -n -m 1 -i -e wgRevisionId | tr -d ':' | sed "s/\"/%/g" | cut -d'%' -f3 >> $Projectdir/$line/$line.RevisionId
       if [ "$line" != "$1" ]
       then          
         cat $Projectdir/$line/$line.RevisionId  >> $PageSclt
       fi
       cat $Projectdir/$line/$line.RevisionId
       

#P    license du bas de page : 
#P    <li id="footer-info-copyright">Les textes sont disponibles sous <a href="https://creativecommons.org/licenses/by-sa/3.0/">license Creative Commons attribution partage à l’identique</a> ; d’autres termes peuvent s’appliquer.<br/>
#P      Voyez les <a href="https://wikimediafoundation.org/wiki/Conditions_d'utilisation">termes d’utilisation</a> pour plus de détails.<br/></li>
#P
#P    Print license :
#P    <link rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/"/>


#T echo ", ''Copyright :''"  >> ArticleUn.tmp
#T cat ArticleUn.str | grep -n -m 1 -i -e license | sed "s/\"\//%\//g" | cut -d'%' -f2 |sed "s/\/\//https:\/\//g"  >> ArticleUn.tmp
#O    Print license :
       echo -n ", ''license : ''" > $Projectdir/$line/$line.license
    #T cat $Projectdir/$line/$line.str | grep -n -m 1 -i -e license | sed "s/\"\//%\//g" | cut -d'%' -f4 >> $Projectdir/$line/$line.license
       cat $Projectdir/$line.str | grep -n -m 1 -i -e license | sed "s/\"\//%\//g" | tr '"' '%' | cut -d'%' -f4 >> $Projectdir/$line/$line.license
    #T cat $Projectdir/$line/$line.str | grep -n -m 1 -i -e license | sed "s/\"\//%\//g" | cut -d'%' -f2 | sed "s/\/\//https:\/\//g" >> $Projectdir/$line/$line.license
       if [ $line != $1 ]
       then  
         cat $Projectdir/$line/$line.license >> $PageSclt
       fi
       cat $Projectdir/$line/$line.license
       #
       #P spécial pour bas de page fr ## 
       cat $Projectdir/$line/$line.str | grep -n -m 1 -i -e footer-info-copyright | sed "s/\"\//%\//g" | tr '"' '%' | cut -d'%' -f4  > $Projectdir/$line/$line.license

#O    Author(s).  
       echo -n ", ''author(s) : ''" > $Projectdir/$line/$line.author
       
       cat $Projectdir/$line/$line.str | grep -n -m 1 -i -e wgRelevantUserName | sed "s/\"/%/g" | cut -d'%' -f4 > tmp
       if test -s tmp; 
         then cat tmp >> $Projectdir/$line/$line.author; rm tmp;
         else 
           echo "Author not found ! " >> $Projectdir/$line/$line.author
           if wget --spider https://xtools.wmflabs.org/articleinfo/en.wikibooks.org/$line 2>/dev/null
           then
             echo "  see : https://xtools.wmflabs.org/articleinfo/en.wikibooks.org/$line" >> $Projectdir/$line/$line.author
           elif wget --spider https://xtools.wmflabs.org/articleinfo/en.wikibooks.org/$Bookname/$line 2>/dev/null
           then 
             echo "  see : https://xtools.wmflabs.org/articleinfo/en.wikibooks.org/$Bookname/$line" >> $Projectdir/$line/$line.author
           else echo "  see ''contributors'' in book ''$Bookname'' history page of ''$line''"  >> $Projectdir/$line/$line.author
           fi
       fi
       #https://xtools.wmflabs.org/articleinfo/en.wikibooks.org/Guide_to_Unix/Introduction
       
       if [ $line != $1 ]
       then
         cat $Projectdir/$line/$line.author >> $PageSclt
         cat $Projectdir/$line/$line.author
       fi
       
       echo "" >> $PageSclt
       
#O fin du tant que.
    done < $Pjlist
    echo "</div>" >> $PageSclt
    echo "{{Newpage}}" >> $PageSclt
    
    if [ "$2" = "--t" ]; then more $PageSclt; fi

exit 0
# En of en_sclt.inc

tests_add_sclt.bash

#! /bin/bash
#P file : tests_add_sclt.bash
#P Syntax ./tests_add_sclt.bash <short-bookname> [ --t ]
VERSION=210528
#O Clean screen
    clear
#O Include install variables
    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    
#O add_sclt global variables
    source $Workdir/vars/installdir.var
#O Print tests_add_sclt.bash version
    echo " tests_add_sclt.bash version = $VERSION"
    sleep 2
#T    echo "----"
#O Control if the test add_sclt.sh file is clean
    echo -e "\033[1;33m Control add_sclt.sh in the local test directory \033[0m" > text-control.txt 
    echo -e "\033[1;33m Please check that the comment line does not contain an command \033[0m" >> text-control.txt
    echo -e "\033[1;33m ----  \033[0m"
    echo -e "\033[1;33m### add_sclt.sh ###\033[0m" >> text-control.txt
    grep -n -e "#T\|#O\|#P" add_sclt.sh >> text-control.txt
    echo -e "\033[1;33m###### en_sclt.inc ###\033[0m" >> text-control.txt
    grep -n -e "#T\|#O\|#P" en_sclt.inc >> text-control.txt 
    echo -e "\033[1;33m###### fr_sclt.inc ###\033[0m" >> text-control.txt
    grep -n -e "#T\|#O\|#P" fr_sclt.inc >> text-control.txt 
    more text-control.txt
    echo; echo -e "\033[47m\033[1;30m Continue ? \033[0m"
    read -s -e -n 1 -t 60 -p "y/n ? : " Inkey;echo
#T     echo "Inkey = $Inkey"
    if [ "$Inkey" != 'y' ]; then echo " Inkey is not yes, or time out after 60 sec, exit from $0"; exit 0;fi
    #O Test with first param empty
    echo "Command ./add_sclt.sh without parameter"
    ./add_sclt.sh
    echo;echo " wait for 2 sec"
    sleep 2; echo "----"
#O Test, all with option --t 
   echo " All tests whith parameter --t"   
#O add_sclt local books for tests
    Inkey=1
    for i in 'seq 1 9'
    do 
      cat $Workdir/tests/sitelist.txt; echo
      echo -e "\033[47m\033[1;30m Choose the site number to test \033[0m"
      read -s -n1 -p "inkey number 1 to 9 : " Inkey; echo;
      if [ "$Inkey" = "1" ]; then ./add_sclt.sh LivreTest --t
      elif [ "$Inkey" = "2" ]; then ./add_sclt.sh Hélices_de_navires_à_déplacement --t
      elif [ "$Inkey" = "3" ]; then ./add_sclt.sh TestBook --t
      elif [ "$Inkey" = "4" ]; then ./add_sclt.sh Mkd_\(Extracteur_de_documents\) --t
      elif [ "$Inkey" = "5" ]; then ./add_sclt.sh Faire_fleurir_le_sel --t
      elif [ "$Inkey" = "6" ]; then ./add_sclt.sh Faire_sa_fleur_de_sel --t      
      elif [ "$Inkey" = "7" ]; then ./add_sclt.sh Guide_to_Unix --t
      elif [ "$Inkey" = "8" ]; then ./add_sclt.sh Tests_de_la_capacité_des_batteries_d%27accumulateurs --t
      elif [ "$Inkey" = "9" ]; then ./add_sclt.sh LivreTest --t
      else echo "$inkey local url of site not found"; exit 0
      fi
    done
#O End tests_add_sclt.bash

See results

LivreTest

Auto-éditer un wikilivre/Annexer (Version internationalisée)/src/add sclt.sh/LivreTest.sclt

TestBook

Auto-éditer un wikilivre/Annexer (Version internationalisée)/src/add sclt.sh/TestBook.sclt