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

Contenu supprimé Contenu ajouté
m →‎en_slipco.inc.sh : Mise àjour
Ligne 58 :
#! /bin/bash
#H File : en_sclipco.inc include in add_sclipco.sh
Version=210710210712
cd $Projectdir
if [ "$2" = "--t" ]
Ligne 144 :
#T echo "*** $htmlline.co.str : ***"; cat $htmlline.co.str; exit 0
#O images,
echo -n "'''$(gettext ' Illustration : ')'''" > $htmlline.co.title
cat $htmlline.co.str | grep wgTitle | cut -d '"' -f4 >> $htmlline.co.title
cat $htmlline.co.title >> $Pagesclipco
Ligne 150 :
#T echo "*** $htmlline.co.title : ***"; cat $htmlline.co.title; exit 0
#O source,
echo -n ", ''$(gettext ' source : ')''https://commons.wikimedia.org/wiki/" > $htmlline.co.source
echo -n $htmlline | sed "s/.html//g" | sed "s/.str//g" >> $htmlline.co.source
if [ "$Site" = "fr.wikibooks.org" ]; then echo "?uselang=fr" >> $htmlline.co.source
Ligne 160 :
#T echo "*** $htmlline.co.source : ***"; cat $htmlline.co.source; exit 0
#O license,
echo -n "$(gettext ' , ''license : ')'' " > $htmlline.co.license
cat $htmlline.co.str | grep licensetpl_short | sed "s/<td>//g" | sed "s/<span class//g" | sed "s/<\/span>//g" | sed "s/style=\"display:none;\"//g" | tr '=' '\n' | grep licensetpl_short | awk -F">" '{print $NF}' >> $htmlline.co.license
cat $htmlline.co.license >> $Pagesclipco
Ligne 167 :
#O auteur(s).
echo -n '' > tmp
echo -n "$(gettext ' , ''author(s) : '' ')" > $htmlline.co.author
cat $htmlline.co.str | grep -i -n -m1 -A 1 -e Author -e Auteur | tr '/' '\n' | grep -i -e user -e utilisteur -e auteur -e author | cut -d '"' -f1 | grep -i -e user -e utilisteur -e auteur -e author > tmp
read Tmp < tmp