Skip to content

seryogakovalyov/cue-normalize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cue-normalize

Minimal Bash CLI for normalizing and repairing problematic .cue files in large music archives.

Features

  • Recursively scans .cue files from a selected archive root
  • Converts legacy encodings to UTF-8
  • Removes UTF-8 BOM and CRLF line endings
  • Repairs common broken TITLE, PERFORMER, SONGWRITER, FILE, and TRACK lines
  • Tries to resolve broken FILE references from adjacent audio files
  • Creates centralized backups in Original_CUE/
  • Does not create backup directories in --dry-run mode
  • Uses temporary files and only replaces originals after validation
  • Supports --dry-run and --verbose

Usage

Run from the root of a music archive:

cue-normalize --dry-run --verbose
cue-normalize

Or pass an archive root explicitly:

cue-normalize --dry-run --verbose /path/to/music/archive
cue-normalize /path/to/music/archive

Show help:

cue-normalize --help

Show version:

cue-normalize --version

Dependencies

Required at runtime:

  • bash
  • coreutils
  • findutils
  • grep
  • sed
  • gawk
  • perl
  • file

Optional:

  • uchardet for better encoding detection

iconv is used for charset conversion and is typically provided by glibc on Arch Linux.

Design Philosophy

  • Keep it a single Bash script
  • Prefer conservative fixes over speculative rewriting
  • Use simple Unix tools
  • Back up first, then modify
  • Skip unsafe cases instead of forcing changes

Limitations

  • Does not fully implement the CUE specification
  • Focuses on real-world corruption cases seen in music archives
  • Not a full validator
  • Cannot make ambiguous FILE references safe if multiple audio files match
  • Some libcue limitations, such as very large track counts, are outside the scope of this tool

AUR Packaging Notes

The included PKGBUILD installs:

  • the cue-normalize executable to /usr/bin
  • the MIT license to /usr/share/licenses/cue-normalize/

License

MIT

About

CLI tool to normalize and repair problematic CUE files

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages