Skip to main content

A simple tool to fix problematic CUE files.

Project description

CueFix

Python PyPI Travis-CI Downloads Join the chat at https://gitter.im/cuefix/community License

CueFix is simple command-line tool to fix CUE files which are popular in lossless audio / albums.

CueFix provides the following functionalities:

  • automatically detect encoding of CUE file: GB2312, GBK, GB18030, UTF-8, UTF-8 BOM, and SHIFT-JIS
  • convert encoding of CUE file: support GB2312, UTF-8, UTF-8 BOM, etc.
  • convert newline format of CUE file: support Windows CRLF and Unix LF
  • scan the directory and fix not matched audio file in CUE file
  • backup the original CUE file so that users can revert the CUE file back
  • interactive with users to verify fixed CUE files

Please feel free to fork and contribute to the project if you like.

Installation

Prerequisites

The following dependencies are necessary:

  • Python 3.6 or above

Option 1: Install via pip

The official release of cuefix is distributed on PyPI. Note that you should use the Python 3 version of pip:

$ pip3 install cuefix

Option 2: Download from Github or git clone

This is the recommended way for developers.

$ git clone git://github.com/yinyanghu/cuefix

Run ./setup.py install to install cuefix to your user path.

Upgrading

If you install cuefix using pip, you could upgrade it via

$ pip3 install --upgrade cuefix

Getting Started

$ cuefix -h
usage: cuefix [-h] [--version] [-v] [-y] [-i] [--dryrun] [-e {utf-8-sig,utf-8,gb2312}] [-n {unix,windows}]
              [--no-encoding] [--no-newline] [--no-backup]
              filepath

Fix a CUE file in a directory: convert encoding, convert newline character, fix not matched audio file.

positional arguments:
  filepath              file path to the input cue file

optional arguments:
  -h, --help            show this help message and exit
  --version             print the version of cuefix and exit
  -v, --verbose         enable verbose output

dry-run options:
  -y, --yes             disable interactive mode and yes to all prompts
  -i, --info            display metainfo of the input cue file only
  --dryrun              dry-run and print out fixed cue file

fix options:
  -e {utf-8-sig,utf-8,gb2312}, --encoding {utf-8-sig,utf-8,gb2312}
                        encoding which cue file will be converted to, default is UTF-8 BOM (utf-8-sig)
  -n {unix,windows}, --newline {unix,windows}
                        newline format which cue file will be converted to, default is Unix
  --no-encoding         converting encoding will be skipped
  --no-newline          converting newline will be skipped

backup options:
  --no-backup           no backup for the input cue file, USE WITH CAUTION!

You can recursively run cuefix to fix all CUE file in a directory:

$ find <directory> -type f -name "*.cue" -exec cuefix -v {} \;

CUE Formats Supported by Popular Media Players

Media Players

  • Foobar 2000
    • Windows (version 1.5.5)
  • DeaDBeeF
    • Linux (version 1.8.4)
    • Android
    • Windows (unstable, nightly build)
    • macOS (unstable, nightly build)
  • VOX
    • macOS (version 3.3.17)
    • iOS
  • Synology Audio Station
    • Synology DSM (version 6.2.3)
    • Audio Station (version 6.5.5-3374)

Encoding

Please use the following encoding name in cuefix:

  • UTF-8: utf-8
  • UTF-8 BOM: utf-8-sig
  • GB 2312: gb2312
Platform UTF-8 UTF-8 BOM GB 2312
Foobar 2000 Windows :x: :heavy_check_mark: :heavy_check_mark:
DeaDBeeF Linux / Android :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
VOX macOS / iOS :heavy_check_mark: :heavy_check_mark: :x:
Synology Audio Station NAS / Linux :heavy_check_mark: :heavy_check_mark: :x:

Note: DeaDBeeF on Linux could support CUE file in encoding GB 2312 by enabling Chinese CP 936 detection and recording in the settings. However, DeaDBeeF on macOS still cannot support GB 2312 even if we enable the setting. DeadDBeeF on Android has not been tested yet.

Note: VOX on iOS has not been tested yet.

Newline

Platform Unix (LF) Windows (CRLF)
Foobar 2000 Windows :heavy_check_mark: :heavy_check_mark:
DeaDBeeF Linux / Android :heavy_check_mark: :heavy_check_mark:
VOX macOS / iOS :heavy_check_mark: :heavy_check_mark:
Synology Audio Station NAS / Linux :heavy_check_mark: :heavy_check_mark:

License

GNU General Public License v3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cuefix-0.1.3.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

cuefix-0.1.3-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file cuefix-0.1.3.tar.gz.

File metadata

  • Download URL: cuefix-0.1.3.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0

File hashes

Hashes for cuefix-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6f6595c71aca41fee999b339ac10cf1d23435996f8825c0111c89c00aad9afa7
MD5 479037bc52c761101e2b444a36615f57
BLAKE2b-256 14ebe07eca30b3e80d54eb9649a2e41fdb8995d9271b29422fb17308eea2a7d8

See more details on using hashes here.

File details

Details for the file cuefix-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: cuefix-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0

File hashes

Hashes for cuefix-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 36eade810de9bd4bd30bfcaf7a7cda89d5d383135495751413a7ab2ed065deba
MD5 042007f7dc9df3d3901c79dd8e2e87bb
BLAKE2b-256 269b2d4bc96cc59231aba9cc68922dcec2ca25eae98f5f585317328952bedd63

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page