« Auto-éditer un wikilivre/addappendix/reconstruction et tests du script addappendix » : différence entre les versions
Auto-éditer un wikilivre/addappendix/reconstruction et tests du script addappendix (modifier)
Version du 5 mars 2022 à 12:49
, il y a 1 an→script addapendix.sh : Mise à jour du script
m (→Annexe créée avec addappendix : WL:RD : * diverses retouches) |
(→script addapendix.sh : Mise à jour du script) |
||
#P -------------------------------
VERSION=
TEXTDOMAIN=addappendix
#TEXTDOMAINDIR="/usr/share/locale"
TEXTDOMAINDIR="~/Add_appendix/share/locale"
export TEXTDOMAINDIR
#O Copy the html files to respective directories
#O Create a file with the pagename $Projectdir/$Bookname.mainPage
echo
echo $"
cat $Projectdir/$Bookname.locale.list | sed "s/ /\\ /g" | cut -d ',' -f1 > $Projectdir/$Bookname.mainPage
echo "----------"
read Destination < destination
echo "Destination = $Destination"
echo $"
cp -f "./$Source" "$Destination"
done < $Projectdir/$Bookname.list
#O Add the link to printable book and to articles.
echo "$(gettext '== Contents == ')" >> $PageSclt
echo "<div style=
cat $Projectdir/$Bookname.list | tr ' ' '_' | tr '\n' '%' | sed "s/%/\n\n/g" >> $PageSclt
echo "</div>" >> $PageSclt
#0 Add the link to the source of this edition.
echo "$(gettext '=== Source for this edition === ')" >> $PageSclt
echo "<div style=
echo -n "https://" >> $PageSclt
cat $Projectdir/$Bookname.mainPage | sed "s/\\\ /_/g" >> $PageSclt
#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 -n "<span style=
echo "$(gettext '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 $"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=
echo "----------"
#O Author(s).
echo -n "$(gettext ', ''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
if wget --spider https://xtools.wmflabs.org/articleinfo/en.wikibooks.org/$line 2>/dev/null
then
#O Show Headscli filename to console
echo
echo
echo $"== Images sources licenses and contributors ==" > $Headscli
echo -n $"<span style=
echo " " >> $Headscli
echo "<div style=
echo >> $Headscli
#T Show the content of file Headscli cat $Headscli; exit 0
cat $line.license
echo -n ", ''$(gettext ' author
rm tmp
cat $line.str | grep -i -n -m1 -A 1 -e Author | grep -i -e user -e utilisteur -e auteur | tr '/' '\n' | grep -i -e user -e utilisteur -e auteur | cut -d '"' -f1 > tmp
#T echo "*** commonshtml.list ***"; cat commonshtml.listexit 0
#O Copy article name in file $Bookname.sclipco
echo "'''Article : $pjline'''<br
echo "'''Article : $pjline'''"
#O authors.
rm -rf tmp
#Pwww echo -n ", ''$(gettext '
#echo -n $", ''
echo -n ", ''
#Test cat tmp; echo "$htmlline.co.authors"; exit -1
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
|