Help - Search - Members - Calendar
Full Version: EAC and cue sheets
Hydrogenaudio Forums > CD-R and Audio Hardware > CD Hardware/Software
Von
There are still some things I haven't managed to figure out how to do in EAC.

1) How can I create cue sheets where the paths to the files are left out? In many cases I wish to store the cue sheet in the same folder as the wav files, so I need only the filename, not the path. Changing this for every file in the cue sheet is a drag...

2) Sort of the same thing as my first question, when I use "Copy selected tracks - Compressed" for ripping and encoding directly to ape files, I would like to have the file names in my cue sheet to have the extension ape instead of wav.

If there is any way I can avoid having to do this manually, I would appreciate your advice.

Von
Von
No ideas? Anyone? unsure.gif
sinan
I don't think either is possible within EAC. You can try the following script. It removes path/drive info (if present) from every FILE "..." WAVE line, leaving just filenames, and also changes the .wav extensions to .ape. If it's already pathless or has a different extension there's no problem. If you delete the sub() line (4th), it removes the path but doesn't change the extension.
CODE
match($0, /FILE/) {
   file = gensub(/FILE "(.*)" WAVE/, "\\1", "g")
   s_file = strip_path(file)
   sub(/\.wav/, ".ape", s_file)
   print "FILE \"" s_file "\" WAVE"
}

!match($0, /FILE/)

function strip_path(path) {
   n_elems = split(path, array, "\\")
   return array[n_elems]
}


Usage:
CODE
type cuesheet.cue | gawk -f this-script-file-name > output.cue
move output.cue cuesheet.cue

(This has to be in two steps, otherwise input is truncated.)

gawk is available on many places in the Internet. e.g. example

If you make the following batch file, you can add it to the right-click menu of cue sheets.
CODE

type %1 | gawk -f c:\somewhere\this-script-file-name > %TEMP%\cuesheet-tmp.cue
move /y %TEMP%\cuesheet-tmp.cue %1
phwip
What a neat little script. Thanks sinan.

I was also wondering how to get around these issues with cue sheets and had even wondered about writing an app to do it myself, but this does the job perfectly.
Von
Thanks! I have absolutely no experience in writing and/or using scripts, but I suppose the time has come for me to learn something new.
smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.