Tool to extract CD audio from RAR archives and convert WAV+CUE pairs into
individual FLAC tracks with correct names and synced lyrics.
unrar, cuetools, shntool, flacsudo apt-get install -y unrar cuetools shntool flacmutagen (FLAC tag handling)pycryptodome (Netease API encryption)pip3 install mutagen pycryptodomepython3 skills/cd2flac/scripts/cd2flac.py <directory> [options]
python3 skills/cd2flac/scripts/cd2flac.py "/path/to/albums/"
python3 skills/cd2flac/scripts/cd2flac.py "/path/to/albums/" --lyrics
python3 skills/cd2flac/scripts/cd2flac.py "/path/to/albums/" --lyrics-only
python3 skills/cd2flac/scripts/lyric.py "/path/to/album/"
python3 skills/cd2flac/scripts/lyric.py "/path/to/track.flac"
python3 skills/cd2flac/scripts/cd2flac.py "/path/to/albums/" --dry-run
python3 skills/cd2flac/scripts/cd2flac.py "/path/" --keep-wav --delete-rar
python3 skills/cd2flac/scripts/cd2flac.py "/path/" --recursive --lyrics
python3 skills/cd2flac/scripts/cd2flac.py "/path/to/album_with_wav/"
shnsplit to split each WAV into individual FLAC tracksCD1/, CD2/, etc. subdirectoriesLyrics are fetched using the same strategy as ESLyric:
Synced LRC is embedded as Vorbis comment LYRICS tag. If Netease provides
translation lyrics, they go in LYRICS_TRANSLATIONS tag.
The script auto-detects and fixes GBK→UTF-8 mojibake in track names by
comparing the actual filename bytes against the CUE sheet's GBK-encoded titles.
If a directory contains multiple WAV+CUE pairs, they are treated as separate
discs and placed into CD1/, CD2/, etc. subdirectories.
If the RAR is already extracted but not yet converted, the script detects the
WAV+CUE pairs and processes them directly.
find /path/to/music -name "*.flac" -exec dirname {} \; | sort -u | \
xargs -I{} python3 skills/cd2flac/scripts/lyric.py "{}"
共 2 个版本