Ubuntu Pastebin

Paste from dirk at Tue, 28 Nov 2017 20:23:32 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash


export fileliste="/home/ich/Shell-Skripte/convert-scripte/yad_und_mp3/fileliste.txt"
export wavliste="/home/ich/Shell-Skripte/convert-scripte/yad_und_mp3/wavliste.txt"
export mp3liste="/home/ich/Shell-Skripte/convert-scripte/yad_und_mp3/mp3liste.txt"


function eraseLists() {
	rm -f "$fileliste"
	rm -f "$wavliste"
	rm -f "$mp3liste"
}


eraseLists


function showMsgBox() {
	yad --text="alles umgewandelt."
};export -f showMsgBox


function nachWAV() {
	while read line
  	do
		#line="${line//file:\/\//}"
		#ffmpeg -i "$line" -f wav "${line%.*}.wav" < /dev/null
		echo "$line"
  	done < "$fileliste"
	showMsgBox
};export -f nachWAV


function nachMP3() {
	while read line
  	do
		#line="${line//file:\/\//}"
		#lame -h "${line%.*}.wav" "${line%.*}.mp3"
		echo "$line"
  	done < "$fileliste"
	showMsgBox
};export -f nachMP3


yad 	--dnd \
    	--plug=$$ \
  	--tabnum=1 \
	--text="\n\nMP3(s)\nhier\nablegen" \
	--text-align=center | sed 's/^file:\/\///g' | tee "$fileliste" | \
yad  	--text-info \
	--plug=$$ \
	--tabnum=2 \
	--tail &
yad   	--undecorated \
	--no-escape \
	--paned \
	--title "MP3 Konverter" \
	--key=$$ \
	--orient=hor \
	--splitter=100 \
	--width=400 \
	--height=300 \
	--button="nach WAV:bash -c nachWAV" \
	--button="nach MP3:bash -c nachMP3" \
	--button="beenden:1"


if [ $? == 1 ]
then
	eraseLists
	exit
fi
Download as text