Premier commit - Inclusion dans le système git

This commit is contained in:
Mysaa 2021-05-21 21:36:37 +02:00
commit b237f6b4da
2 changed files with 40 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
score_*.png
score_*.svg
*.pdf

37
fuckYouMusescore Executable file
View File

@ -0,0 +1,37 @@
#!/bin/bash
wget $1 -qO webpage.html
starturl=$(grep -Poe "https://musescore.com/static/musescore/scoredata/gen/[^?@&]+(\?|@|&)" webpage.html | head -1 | sed -e 's#/[^/]*$##')
echo "Téléchargement à l'addresse : $starturl"
rm webpage.html
download () {
i=0
local imgext=$1
echo "Test du téléchargement en $imgext"
while (wget -q "$starturl/score_$i.$imgext" -O "score_$i.$imgext")
do
echo "Convertion de la page $i en pdf"
inkscape "score_$i.$imgext" --export-pdf="score_$i.pdf" --without-gui
if [ $i = 0 ]
then
cp "score_0.pdf" "out.pdf"
else
pdfunite "out.pdf" "score_$i.pdf" "tout.pdf"
cp "tout.pdf" "out.pdf"
rm "tout.pdf"
fi
rm "score_$i.pdf"
let "i++"
done
}
download "svg"
if [ $i = 0 ]
then
echo "J'y suis pas arrivé"
echo "Test du téléchargement en png"
download "png"
fi
echo "Tadaaa, ca fait $i pages!"