I wrote a script that splits ape, wav or flac files based on a cuesheet, transcodes them to flac (at compression level 8), adds tags based on the metadata in the cuesheet and renames them based on the tags (in the form %tracknumber% %tracktitle%).
Usage
Usage of split follows the form split -ext “top-level directory” where ext is one of ape, wav or flac and corresponds to the extension of the image you wish to split. The top-level directory can be either a folder containing numerous folders [of folders of folders, etc.] of images you wish to split or a single folder, and must be the absolute path (no using . either; ~ is fine though). If it is the former, and contains mixed folders with ape and flac images, you should run split with the -flac option first or you’ll wind up with a lot of empty ‘converted’ folders and a lot of complaints on the command-line (although nothing bad will happen).
Requirements
To use split, you must have, at minimum, shntool, flac and cuetools installed. In addition, you must have the script cuetag installed as /usr/bin/cuetag.sh. Some distributions install it as /usr/bin/cuetag; if your distribution does this, you must run ln -s /usr/bin/cuetag /usr/bin/cuetag.sh as root or adjust the script appropriately (sed -i ‘s/cuetag.sh/cuetag/’ split.sh. If you want to split ape images, you must have mac installed.
split.sh requires one cue file and one image file per folder. The cue file must be in the same folder as the image file you wish to split, but can be called anything.
Notes
The accuracy of the title for each track in the cuesheet is critical to split.sh’s operation. For this reason, you should make sure the titles are accurate and correspond to your (or waffle.fm’s) standards before using split.sh. This will prevent duplication of effort later. You can take care of composer/performer in the cuesheet if you want, but it is much easier to batch fix this in any half decent tagging program.
Be sure your edits don’t violate the cuesheet spec (don’t use ‘&’ for instance)! Also, make sure any characters you use are allowed for filenames–I don’t currently check for that.
Download
You can grab it from github – https://github.com/Theta91/split
Todo (Someday, maybe, as this suits my current needs just fine)
|


