Added actual files

This commit is contained in:
silvernode 2013-02-24 01:48:24 -06:00
parent 7a0ddf08a4
commit cbc9118d91
7 changed files with 240 additions and 0 deletions

6
dev.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
t=$(zenity --entry --title="test" --text="name the file: "); zenity --file-selection --save --text="$t" --confirm-overwrite
#$t |
zenity --file-selection --save --confirm-overwrite

6
dev.sh~ Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
t=$(zenity --entry --title="test" --text="name the file: "); | p=$(zenity --file-selection --save --text="$t" --confirm-overwrite)
#$t |
zenity --file-selection --save --confirm-overwrite

105
zymp3 Executable file
View File

@ -0,0 +1,105 @@
#!/bin/bash
MUSICDIR="/home/$USER/Music"
backend()
{
t=~/.youtube-dl-$RANDOM-$RANDOM.flv
youtube-dl --output=$t --format=18 "$1" | zenity --progress --pulsate --title="Downloading..." --text="Downloading video, please wait.." --auto-close
ffmpeg -i $t -acodec libmp3lame -ac 2 -ab 128k -vn -y "$2" | zenity --progress --pulsate --title="Converting..." --text="Converting video to mp3.." --auto-close
rm $t
}
gui()
{
x=$(zenity --title="Zymp3 0.1-1" --entry --text "Paste youtube link here: ")
if [[ $? == 0 ]] ; then
gui2
else
exit 0;
fi
}
gui2()
{
y=$(zenity --title="Filename" --entry --text "Name your file: ")
if [[ $? == 0 ]] ; then
dconvert
else
exit 0;
fi
}
open()
{
zenity --question --title="Hey!" --text="I moved $y.mp3 to $MUSICDIR, do you want to play it now?"
if [[ $? == 0 ]] ; then
vlc "/home/$USER/Music/$y.mp3"
else
exit 0;
fi
}
move()
{
mkdir /home/$USER/Music
mv "$y.mp3" /home/$USER/Music
}
dconvert()
{
backend "$x" "$y.mp3"
move
if [ -f "/home/$USER/Music/$y.mp3" ]
then notify-send "$y.mp3 was saved in $MUSICDIR}"
else
zenity --error --text "Oh no! Something fucked up! fuck.."
fi
open
}
gui

9
zymp3.desktop Executable file
View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=Zymp3
Comment=Convert youtube videos to mp3
Exec=zymp3
Icon=zymp3.png
Terminal=0
Type=Application
Encoding=UTF-8
Categories=AudioVideo;Application;

9
zymp3.desktop~ Executable file
View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=Zymp3
Comment=Convert youtube videos to mp3
Exec=zymp3
Icon=/usr/share/icons/convert1.png
Terminal=0
Type=Application
Encoding=UTF-8
Categories=AudioVideo;Application;

BIN
zymp3.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

105
zymp3~ Executable file
View File

@ -0,0 +1,105 @@
#!/bin/bash
MUSICDIR="/home/$USER/Music"
backend()
{
t=~/.youtube-dl-$RANDOM-$RANDOM.flv
youtube-dl --output=$t --format=18 "$1" | zenity --progress --pulsate --title="Downloading..." --text="Downloading video, please wait.." --auto-close
ffmpeg -i $t -acodec libmp3lame -ac 2 -ab 128k -vn -y "$2" | zenity --progress --pulsate --title="Converting..." --text="Converting video to mp3.." --auto-close
rm $t
}
gui()
{
x=$(zenity --title="Zymp3 0.1-1" --entry --text "Paste youtube link here: ")
if [[ $? == 0 ]] ; then
gui2
else
exit 0;
fi
}
gui2()
{
y=$(zenity --title="Filename" --entry --text "Name your file: ")
if [[ $? == 0 ]] ; then
dconvert
else
exit 0;
fi
}
open()
{
zenity --question --title="Hey!" --text="I moved $y.mp3 to $MUSICDIR, do you want to play it now?"
if [[ $? == 0 ]] ; then
vlc "/home/$USER/Music/$y.mp3"
else
exit 0;
fi
}
move()
{
mkdir /home/$USER/Music
mv "$y.mp3" /home/$USER/Music
}
dconvert()
{
backend "$x" "$y.mp3"
move
if [ -f "/home/$USER/Music/$y.mp3" ]
then notify-send "$y.mp3 was saved in $MUSICDIR}"
else
zenity --error --text "Oh no! Something fucked up! fuck.."
fi
open
}
gui