flag=0 else flag=1 fi if [ $flag == 0 ] then kdialog --title "Conv-To-IPhone v0.9" --msgbox "Conv-To-IPhone v0.9 Prima d'iniziare bisogna avere installato: faac ffmepg mplayer poc-streamer o poc, a secondo della vostra distribuzione 6 Semplici regole 1 - Dato che le QT supportano il lowercase, IL FILE MP3 NON DEVE AVERE SPAZI! Es. 01 - nome song.mp3 Ma deve essere così: 01-nomesong.mp3 o 01_-_nome_song.mp3 2 - Il nome da dare al file .m4r deve essere anche esso senza spazi 3 - NON USATE [ / % & () ' ] PER TITOLARE UNA CANZONE 4 - Fate in modo che il vostro iphone sia connesso alla rete wirelles e che SSH sia abilitato 5 - Le suonerie degli sms che sono più lunghe di 5 secondi nella maggior parte dei case non vengono lette dall'iphone 6 - I wallpaper devono essere rigorosamente in formato PNG Per qualsiasi bug o chiarimento contattatemi all'indirizzo subrikk@gmail.com subrikk Development" else zenity --info --text "Conv-To-IPhone v0.9 Prima d'iniziare bisogna avere installato: faac ffmepg mplayer poc-streamer o poc, a secondo della vostra distribuzione 4 Semplici regole: 1 - NON USATE CARATTERI STRANI PER TITOLARE UNA CANZONE 2 - Fate in modo che il vostro iphone sia connesso alla rete wirelles e che SSH sia abilitato 3 - Le suonerie degli sms che sono più lunghe di 5 secondi nella maggior parte dei case non vengono lette dall'iphone 4 - I wallpaper devono essere rigorosamente in formato PNG Per qualsiasi bug o chiarimento contattatemi all'indirizzo subrikk@gmail.com subrikk Development" fi scelta(){ if [ $flag == 0 ] then urlf=`kdialog --title "Conv-To-IPhone" --title "Seleziona il tuo file senza spazi" --getopenurl /home ` if [ "$?" == "1" ] then exit fi echo $urlf > .1.txt file_1=`sed -n 's/file:\/\///p' .1.txt` echo $file_1 sed -n 's/file:\/\///p' .1.txt > .2.txt file=`cat .2.txt|cut -d '.' -f1` else file=`zenity --file-selection --text="Seleziona il file"` fi } upload_file(){ if [ $flag == 0 ] then path=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci path di destinazione" "es: /Library/Ringtones o /System/Library/Audio/UISounds o altro"` IP=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci IP IPHONE" "192.168.x.x"` ping="0 received," ping=`ping -qnc 1 $IP | grep ' received,' |awk '{print $4 " "$5}'` echo $ping if [ "$ping" == "1 received," ] then konsole -e scp -C -r $file root@$IP:$path else kdialog --title "Conv-To-IPhone" --yesno "IP NON RAGGIUNTO, ACCERTARSI DI AVER SCRITTO CORRETTAMENTE L'IP, RIPROVARE?" if [ "$?" == "0" ] then upload else kdialog --msgbox "Bye" fi fi else path=`zenity --entry --text="Inserisci path di destinazione"` IP=`zenity --entry --text="Inserisci IP IPHONE" --entry-text="192.168.X.X"` ping="0 received," ping=`ping -qnc 1 $IP | grep ' received,' |awk '{print $4 " "$5}'` echo $ping if [ "$ping" == "1 received," ] then gnome-terminal -x scp -C -r "$file" root@$IP:$path else zenity --question --text="IP NON RAGGIUNTO, ACCERTARSI DI AVER SCRITTO CORRETTAMENTE L'IP RIPROVARE?" if [ "$?" == "0" ] then upload else zenity --info --text="Bye" fi fi fi } convert_for_sms(){ if [ $flag == 0 ] then kdialog --title "Conv-To-IPhone" --msgbox "Scegliere la canzone - taglio - up" urlf=`kdialog --title "Conv-To-IPhone" --getopenurl /home "*.mp3"` if [ "$?" == "1" ] then exit fi echo $urlf > .1.txt url=`sed -n 's/file:\/\///p' .1.txt` kdialog --title "Conv-To-IPhone" --msgbox "Fase:2 Taglio mp3 , Max 5 secondi, basta ed avanza per una suoneria sms" inz_tagl=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci Inizio taglio hh:mm:ss" "00:00:00"` fin_tagl=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci Fine taglio ES: 00:01:29" "00:00:00"` mp3cut -o output.mp3 -t $inz_tagl+000-$fin_tagl+000 $url konsole -e ffmpeg -i output.mp3 -f aiff sms-received6.caf else zenity --info --text="Scegliere la canzone - taglio - up" file=`zenity --file-selection --text="Seleziona il file"` if [ "$?" == "1" ] then exit fi zenity --info --text="Fase:2 Taglio mp3 , Max 5 secondi, basta ed avanza per una suoneria sms" inz_tagl=`zenity --entry --text="Inserisci Inizio taglio hh:mm:ss" --entry-text="00:00:00"` fin_tagl=`zenity --entry --text="Inserisci Fine taglio ES: 00:01:29" --entry-text="00:00:00"` gnome-terminal -x mp3cut -o output.mp3 -t $inz_tagl+000-$fin_tagl+000 $file gnome-terminal -x ffmpeg -i output.mp3 -f aiff sms-received6.caf fi } convert_mp3(){ if [ $flag == 0 ] then kdialog --title "Conv-To-IPhone" --yesno "Vuoi tagliare mp3?" if [ "$?" == "0" ] then inz_tagl=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci Inizio taglio hh:mm:ss" "00:00:00"` fin_tagl=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci Fine taglio ES: 00:01:29" "00:00:00"` konsole mp3cut -o output.mp3 -t $inz_tagl+000-$fin_tagl+000 $file file=output.mp3 fi mplayer -ao pcm "$file" -ao pcm:file="~temp.wav" nome_song=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci canzone SENZA_SPAZI ne estenzione" "01_-_nome"` if [ "$?" == "1" ] then rm ~temp.wav rm .1.txt .2.txt .3.txt exit fi konsole -e faac ~temp.wav -o $nome_song.m4r -w rm ~temp.wav rm .1.txt kdialog --title "Conv-To-IPhone" --msgbox "Conversione Completata!" else zenity --question --text "Vuoi tagliare mp3?" if [ "$?" == "0" ] then inz_tagl=`zenity --entry --text="Inserisci Inizio taglio hh:mm:ss" --entry-text="00:00:00"` fin_tagl=`zenity --entry --text="Inserisci Fine taglio ES: 00:01:29" --entry-text="00:00:00"` gnome-terminal -x mp3cut -o output.mp3 -t $inz_tagl+000-$fin_tagl+000 "$file" echo $inz_tagl echo $fin_tagl file=output.mp3 fi mplayer -ao pcm $file -ao pcm:file="~temp.wav" nome_song=`zenity --entry --text="Inserisci canzone SENZA_SPAZI ne estenzione" --entry-text="01_-_nome"` if [ "$?" == "1" ] then rm ~temp.wav exit fi gnome-terminal -x faac ~temp.wav -o $nome_song.m4r -w rm ~temp.wav rm .1.txt zenity --info --text="Convesione Completata!" fi } upload(){ if [ $flag == 0 ] then #path=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci path di destinazione "` IP=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci IP IPHONE" "192.168.x.x"` ping="0 received," ping=`ping -qnc 1 $IP | grep ' received,' |awk '{print $4 " "$5}'` echo $ping if [ "$ping" == "1 received," ] then konsole -e scp -C -r $nome_song.m4r root@$IP:/Library/Ringtones else kdialog --title "Conv-To-IPhone" --yesno "IP NON RAGGIUNTO, ACCERTARSI DI AVER SCRITTO CORRETTAMENTE L'IP RIPROVARE?" if [ "$?" == "0" ] then upload else kdialog --msgbox "Bye" fi fi else #path=`zenity --entry --text="Inserisci path di destinazione" " IP=`zenity --entry --text="Inserisci IP IPHONE" --entry-text="192.168.X.X"` ping="0 received," ping=`ping -qnc 1 $IP | grep ' received,' |awk '{print $4 " "$5}'` echo $ping if [ "$ping" == "1 received," ] then gnome-terminal -x scp -C -r $nome_song.m4r root@$IP:/Library/Ringtones else zenity --question --text="IP NON RAGGIUNTO, ACCERTARSI DI AVER SCRITTO CORRETTAMENTE L'IP RIPROVARE?" if [ "$?" == "0" ] then upload else zenity --info --text="Bye" fi fi fi } upload_sms(){ if [ $flag == 0 ] then IP=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci IP IPHONE" "192.168.x.x"` ping="0 received," ping=`ping -qnc 1 $IP | grep ' received,' |awk '{print $4 " "$5}'` echo $ping if [ "$ping" == "1 received," ] then konsole -e scp -C -r sms-received6.caf root@$IP:/System/Library/Audio/UISounds else kdialog --title "Conv-To-IPhone" --yesno "IP NON RAGGIUNTO, ACCERTARSI DI AVER SCRITTO CORRETTAMENTE L'IP RIPROVARE?" if [ "$?" == "0" ] then upload else kdialog --msgbox "Bye" fi fi else IP=`zenity --entry --text="Inserisci IP IPHONE" --entry-text="192.168.X.X"` ping="0 received," ping=`ping -qnc 1 $IP | grep ' received,' |awk '{print $4 " "$5}'` echo $ping if [ "$ping" == "1 received," ] then konsole -e scp -C -r sms-received6.caf root@$IP:/System/Library/Audio/UISounds ##cambiare else zenity --question --text="IP NON RAGGIUNTO, ACCERTARSI DI AVER SCRITTO CORRETTAMENTE L'IP RIPROVARE?" if [ "$?" == "0" ] then upload else zenity --info --text="Bye" fi fi fi } upload_wall(){ if [ $flag == 0 ] then IP=`kdialog --title "Conv-To-IPhone" --inputbox "Inserisci IP IPHONE" "192.168.x.x"` ping="0 received," ping=`ping -qnc 1 $IP | grep ' received,' |awk '{print $4 " "$5}'` echo $ping if [ "$ping" == "1 received," ] then echo $file_1 konsole -e scp -C -r "$file_1" root@$IP:/Library/Wallpaper else kdialog --title "Conv-To-IPhone" --yesno "IP NON RAGGIUNTO, ACCERTARSI DI AVER SCRITTO CORRETTAMENTE L'IP RIPROVARE?" if [ "$?" == "0" ] then upload else kdialog --msgbox "Bye" fi fi else IP=`zenity --entry --text="Inserisci IP IPHONE" --entry-text="192.168.X.X"` ping="0 received," ping=`ping -qnc 1 $IP | grep ' received,' |awk '{print $4 " "$5}'` echo $ping if [ "$ping" == "1 received," ] then konsole -e scp -C -r "$file" root@$IP:/Library/Wallpaper ##cambiare else zenity --question --text="IP NON RAGGIUNTO, ACCERTARSI DI AVER SCRITTO CORRETTAMENTE L'IP RIPROVARE?" if [ "$?" == "0" ] then upload else zenity --info --text="Bye" fi fi fi } #####INIZIO rm ~temp.wav if [ $flag == 0 ] then scelta=`kdialog --title "Conv-To-IPhone" --menu "Cosa Vuoi fare" "conv" "Converti e Uppa Suoneria" "upp_sms" "Converti e Uppa Suon. SMS" "upp_wallp" "Uppa un Wallpaper" "upp" "Uppa un file"` else scelta=`zenity --title "Conv-To-IPhone" --text "Cosa vuoi fare" --list --radiolist --column="Seleziona" --column="Conv-To-IPhone" False "Converti e Uppa Suoneria" False "Converti e Uppa SMS" False "Uppa un Wallpaper" False "Uppa un file"` fi case $scelta in conv) scelta convert_mp3 kdialog --title "Conv-To-IPhone" --yesno "Vuoi uppare la canzone nell'iphone?" if [ "$?" == "0" ] then upload else kdialog --title "Conv-To-IPhone" --msgbox "Il tuo File è: $nome_song.m4r" fi ;; 'Converti e Uppa Suoneria') scelta convert_mp3 zenity --question --text="Vuoi uppare la canzone nell'iphone?" if [ "$?" == "0" ] then upload else zenity --info --text="Il tuo file è: $nome_song.m4r" fi ;; upp) scelta upload_file ;; 'Uppa un file') scelta upload_file ;; upp_sms) convert_for_sms kdialog --title "Conv-To-IPhone" --yesno "Vuoi uppare la canzone nell'iphone?" if [ "$?" == "0" ] then upload_sms else kdialog --title "Conv-To-IPhone" --msgbox "Bye" fi ;; 'Converti e Uppa Suon. SMS') convert_for_sms zenity --question --text "Vuoi uppare la canzone nell'iphone?" if [ "$?" == "0" ] then upload_sms else zenity --info --text="Il tuo file è: $nome_song.m4r" fi ;; upp_wallp) kdialog --title "Conv-To-IPhone" --msgbox "Devi scegliere un wallpaper con estenzione .PNG altrimenti non verrà visto dall' IPHONE" scelta upload_wall ;; 'Uppa un Wallpaper') zenity --info --text="Devi scegliere un wallpaper con estenzione .PNG altrimenti non verrà visto dall' IPHONE" scelta upload_wall ;; esac