metaflac --import-cuesheet-from="file.cue" --set-tag-from-file="CUESHEET=file.cue" "file.flac"
metaflac --show-tag="CUESHEET" "file.flac" > "file.cue"
metaflac --export-cuesheet-to="file.cue" "file.flac"
metaflac --remove-all "file.flac"
metaflac --dont-use-padding --remove --block-type=PICTURE "file.flac"
metaflac --import-picture-from="cover.jpg" "file.flac"
metaflac --import-picture-from="3|image/jpeg|description|300x300x24|cover.jpg" "file.flac"
# Install cuetools, shntool, flac
brew install cuetools shntool flac
# Download `cuetag` script from
# https://github.com/gumayunov/split-cue/blob/master/cuetag
chmod +x cuetag && mv cuetag /usr/local/bin
# Extract cue
metaflac --show-tag="CUESHEET" "file.flac" > "file.cue"
# Edit cue
cuesheet=REM GENRE Soundtrack
# Remove 'cuesheet=' from the first line, it will be the following
REM GENRE Soundtrack
sed -i """1s|cuesheet=||g" "file.cue" # for mac
sed -i"""1s|cuesheet=||g" "file.cue" # for linux
# split
shnsplit -o flac -f "file.cue" "file.flac"
# cue to each track file
cuetag "file.cue" [0-9]*.flac