Premier commit - Inclusion dans le système git
This commit is contained in:
commit
b237f6b4da
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
score_*.png
|
||||
score_*.svg
|
||||
*.pdf
|
||||
37
fuckYouMusescore
Executable file
37
fuckYouMusescore
Executable 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!"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user