-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
68 lines (65 loc) · 1.68 KB
/
index.html
File metadata and controls
68 lines (65 loc) · 1.68 KB
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
<!DOCTYPE html>
<html lang='en'>
<head>
<style type='text/css'>
.bash_comment {
color:lime;
}
.bash_string {
color:darkgray;
}
.bash_loop {
color:orange;
}
.bash_in {
color:red;
}
.bash_do {
color:yellow;
}
.bash_common_program {
color:olive;
}
.bash_shell {
color:green;
}
.bash_done {
color:magenta;
}
</style>
</head>
<body>
<xmp class='code'>#!/bin/bash
# this script will convert .tta files with matching .cue files into folders full of mp3s
# usage: ./convert.sh
"TEST"
for file in *.tta
do
# gets the base name of the file
filename=$(basename "$file")
filename=${filename%.*}
# creates a root directory to stick stuff in
rdir="$filename.mp3.c"
mkdir $rdir
cd $rdir
# converts the initial tta into flac for easier processing
ffmpeg -i "../$filename.tta" "$filename.flac"
# copies the cue into the root directory with the flac in preparation for separation
cp "../$filename.cue" "$filename.cue"
# uses the cue file to split up the flac
shnsplit -f "$filename.cue" -t %n-%t -o flac "$filename.flac"
# removes the temporary flac file (we don't remove the cue in case we need it later)
rm "$filename.flac"
# begins converting the separate flac files into mp3s
for flac in *.flac
do
# gets the filename again in this separate instance
flacname=$(basename "$flac")
flacname=${flacname%.*}
ffmpeg -i "$flacname.flac" "$flacname.mp3"
rm "$flacname.flac"
done
done</xmp>
<script type='text/javascript' src='bash_highlight.js'></script>
</body>
</html>