History

fix previous commit; make 'help' print real script name; remove another one 'basename' usage

Serge Zirukin committed 16 years ago

Commit ce132fd1 parent d49ebe51 file · +5 −5Browse files

Unified · Split

split2flac.sh+5−5
@@ -36,7 +36,7 @@ NORENAME=0 · 35 unmodified lines
36NOPIC=036NOPIC=0
37REMOVE=037REMOVE=0
38PIC_SIZE="192x192"38PIC_SIZE="192x192"
39FORMAT=${0##split2}39FORMAT=${0##.*split2}
40FORMAT=${FORMAT%.sh}40FORMAT=${FORMAT%.sh}
41 41
42# load settings42# load settings
@@ -49,7 +49,7 @@ unset CUE · 6 unmodified lines
49unset CHARSET49unset CHARSET
50FORCE=050FORCE=0
51 51
52HELP="Usage: split2flac.sh [OPTIONS] FILE52HELP="Usage: split2\${FORMAT}.sh [OPTIONS] FILE
53 -o DIRECTORY * - set output directory53 -o DIRECTORY * - set output directory
54 -cue FILE - use file as a cue sheet54 -cue FILE - use file as a cue sheet
55 -f FORMAT - use specified output format (current is \${FORMAT})55 -f FORMAT - use specified output format (current is \${FORMAT})
@@ -73,7 +73,7 @@ HELP="Usage: split2flac.sh [OPTIONS] FILE · 17 unmodified lines
73NOTE: '-c some_file.jpg -s' only allows cover images, it doesn't set a default one.73NOTE: '-c some_file.jpg -s' only allows cover images, it doesn't set a default one.
74Supported FORMATs: flac, mp3, ogg."74Supported FORMATs: flac, mp3, ogg."
75 75
76README="split2flac.sh splits one big APE/FLAC/WV file to FLAC/MP3/OGG tracks with tagging and renaming.76README="split2flac splits one big APE/FLAC/WV file to FLAC/MP3/OGG tracks with tagging and renaming.
77It's better to pass '-p' option to see what will happen when actually splitting tracks.77It's better to pass '-p' option to see what will happen when actually splitting tracks.
78You may want to pass '-s' option for the first run to save default configuration78You may want to pass '-s' option for the first run to save default configuration
79(output dir, cover image size, etc.) so you won't need to pass a lot of options79(output dir, cover image size, etc.) so you won't need to pass a lot of options
@@ -305,9 +305,9 @@ echo "Setting tags" · 225 unmodified lines
305i=1305i=1
306while [ $i -le ${TRACKS_NUM} ]; do306while [ $i -le ${TRACKS_NUM} ]; do
307 TAG_TITLE=$(cueprint -n $i -t %t "${CUE}")307 TAG_TITLE=$(cueprint -n $i -t %t "${CUE}")
308 f="${OUT}/$(printf %02i $i).${FORMAT}"308 FILE_TRACK="$(printf %02i $i)"
309 FILE_TRACK=$(basename "$f" .${FORMAT})
310 FILE_TITLE=$(echo ${TAG_TITLE} | ${VALIDATE})309 FILE_TITLE=$(echo ${TAG_TITLE} | ${VALIDATE})
310 f="${OUT}/${FILE_TRACK}.${FORMAT}"
311 311
312 echo "$i: ${TAG_TITLE}"312 echo "$i: ${TAG_TITLE}"
313 313

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t