Hi
If you're on Linux and prefer to do it via cli, you may find this script I
wrote useful. Just pass the cue and flac file as arguments and optionally a
destination directory for the flac files. As stated in the usage function,
you need cuetools, shntool and flac installed.
It's not exactly what you're asking for as it doesn't integrate with beets
in any way, but I guess it can be a starting point if you have many albums
to split and want to automate that task before doing a beet import.
Tijl
#! /bin/bash
# Split one flac file into tracks using cuetools.
# Requires: cuetools shntool flac
set -eu
function usage {
echo "Usage: ${0##*/} [-d DEST] FILE.cue FILE.flac"
echo " -d DEST destination (defaults to working directory)"
echo
echo "Requires cuetools, shntool and flac."
}
[[ -z $@ ]] && usage && exit 0
# get the options
while getopts ":d:" opt
do
case $opt in
d) DESTDIR="${OPTARG}" ;;
?) echo "Illegal option: $OPTARG" ;;
esac
done
shift $(( OPTIND-1 ))
# validate args
err=0
if [[ $# -ne 2 || "${1: -4:4}" != .cue || "${2: -5:5}" != .flac ]]
then
usage && err=$(( err+1 ))
else
[[ ! -e "$1" ]] && echo "No such file: $1" >&2 && err=$(( err+2 ))
[[ ! -e "$2" ]] && echo "No such file: $2" >&2 && err=$(( err+3 ))
fi
(( $err )) && exit $err
# split the flac file
CUESHEET="$1"
FLACFILE="$2"
DESTDIR="${DESTDIR:-.}"
mkdir -p "${DESTDIR}"
shnsplit -d "${DESTDIR}" -f "${CUESHEET}" -o flac -t "$$_%n %t"
"${FLACFILE}"
cuetag.sh "${CUESHEET}" "${DESTDIR}"/$$_*.flac
for pid in "${DESTDIR}"/$$_*.flac
do
nopid=$(echo "${pid}" | sed "s,/${$}_,/,")
mv -i "${pid}" "${nopid}"
done
# vim:ts=2:sts=2:sw=2
On Thu, 1 Sep 2016 at 22:15 MBony <[email protected]> wrote:
> I have used CUETools for this in the past few days. It was also a
> relatively easy process.
>
>
> On Thursday, September 1, 2016 at 9:05:34 AM UTC-7, Karcsi Kolbasz wrote:
>>
>> Not sure of how many of these you have, but it might be easier to pre
>> process with foobar2000 or medieval cue splitter. That's how I have
>> handled it in the past.
>
> --
> You received this message because you are subscribed to the Google Groups
> "beets" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"beets" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.