Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
* abc to png
* abc to pdf
* abc to tin_whistle (avec flute.fmt)

Y a plus qu'a tester avec des fichiers réels.
68 changes: 68 additions & 0 deletions scripts/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/bash
# Interface zenity pour lancer le bon script a la demande.

############ FONCTION ################
zenity(){
/usr/bin/zenity "$@" 2>/dev/null
}

#### INTERFACE GRAPHIQUE
choix="$(zenity --width=300 --height=300 \
--list --column "Choix" --radiolist \
--title="Que voulez-vous faire ?" \
--column="Action" \
FALSE abc2abc. \
FALSE abc2mp3. \
FALSE abc2png. \
FALSE abc2tin.)" 2>/dev/null

##### abc2abc
abc2abc ()

if zenity --width=250 --height=200 --question --text="Format abc vers abc.\nContinuer ?"
then
source ./AbcToAbc.sh | tee >(zenity --progress --pulsate)
else
exit 0
fi


##### abc2mp3
abc2mp3 ()
if zenity --width=250 --height=200 --question --text="Convertir en mp3.\nContinuer ?"
then
source ./AbcToMp3.sh | tee >(zenity --progress --pulsate)
else
exit 0
fi

##### abc2png
abc2mp3 ()
if zenity --width=250 --height=200 --question --text="Transformer en png.\nContinuer ?"
then
source ./AbcToPNG.sh | tee >(zenity --progress --pulsate)
else
exit 0
fi

##### abc2tin
abc2tin ()
if zenity --width=250 --height=200 --question --text="Convertir en tablature.\nContinuer ?"
then
source ./AbcToTin.sh | tee >(zenity --progress --pulsate)
else
exit 0
fi


### MAIN MENU ####################
# ------------------------
if [ $choix = "abc2abc." ] ; then
abc2abc
elif [ $choix = "abc2mp3." ] ; then
abc2mp3
elif [ $choix = "abc2png." ] ; then
abc2png
elif [ $choix = "abc2tin. " ]; then
abc2tin
fi