Skip to main content

zerocue - zeros-out your CUE sheet file

Python-based command-line utility (CLI) to remove first leading INDEX track time from any subsequent INDEX timestamps in a CUE sheet file.

Install

pip install zerocue

Requirements

  • Python >= 3.8.x

NOTE: this is the version I used to develop and test it but it should work with any version of Python above 3.x

Usage

usage: zerocue [-h] [-v] [-o OUTPUT | -w] cuefile

remove first INDEX track time from every following INDEXes in a CUE sheet file

positional arguments:
  cuefile               source CUE file (e.g playlist.cue)

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         send informative logs to STDERR
  -o OUTPUT, --output OUTPUT
                        write to OUTPUT file instead of STDOUT
  -w, --inline          overwrite source CUE file

zerocue reads content from a CUE sheet file (which name is the only accepted and required CLI argument) and prints the content of the same CUE sheet file with updated INDEX time values, i.e. set the first INDEX timestamp to 00:00:00 and remove the initial first INDEX track elapsed time from every subsequent INDEX record in the sheet.

Examples

Assuming playlist.cue is a file in the current working directory which has the following example content (CUE sheet excerpt taken from https://kodi.wiki/view/Cue_sheets):

REM GENRE Ska
REM DATE 1991
REM DISCID D00DA810
REM COMMENT "ExactAudioCopy v0.95b4"
PERFORMER "The Specials"
TITLE "Singles"
FILE "The Specials - Singles.wav" WAVE
  TRACK 01 AUDIO
    TITLE "Gangsters"
    PERFORMER "The Specials"
    INDEX 01 01:57:31
  TRACK 02 AUDIO
    TITLE "Rudi, A Message To You"
    PERFORMER "The Specials"
    INDEX 00 02:47:74
    INDEX 01 02:48:27
  TRACK 03 AUDIO
    TITLE "Nite Klub"
    PERFORMER "The Specials"
    INDEX 00 05:41:50
    INDEX 01 05:42:27

than running zerocue playlist.cue will print the following output:

REM GENRE Ska
REM DATE 1991
REM DISCID D00DA810
REM COMMENT "ExactAudioCopy v0.95b4"
PERFORMER "The Specials"
TITLE "Singles"
FILE "The Specials - Singles.wav" WAVE
  TRACK 01 AUDIO
    TITLE "Gangsters"
    PERFORMER "The Specials"
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Rudi, A Message To You"
    PERFORMER "The Specials"
    INDEX 00 00:50:43
    INDEX 01 00:50:71
  TRACK 03 AUDIO
    TITLE "Nite Klub"
    PERFORMER "The Specials"
    INDEX 00 03:44:19
    INDEX 01 03:44:71

To create a new CUE sheet you can either redirect STDIN to a (new) file, use the --output option to create a new file, or use the --inline option to update the source file.

These two commands should be equivalent and will replace new_playlist.cue content if already present:

  • zerocue playlist.cue > new_playlist.cue
  • zerocue --output=new_playlist.cue playlist.cue

while this will overwrite the content of playlist.cue:

  • zerocue --inline playlist.cue

Unit Tests

To run unit tests: make dependencies tests

NOTE: make dependencies will install pytest and pylint in your current environment. Probably you want to initialize a new Python Virtualenv first:

git clone https://github.com/shaftoe/zerocue
cd zerocue
make install-venv
source .env/bin/activate

Contribute

Contributions are welcome, just open an issue/pull request or get in touch with me directly if you prefer.

Metadata

Release files for zerocue 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zerocue 0.3.0
File Size Uploaded Provenance
zerocue-0.3.0.tar.gz 4.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zerocue 0.3.0
File Interpreter ABI Platform
zerocue-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.9 kB

Release files / zerocue-0.3.0.tar.gz

Download URL zerocue-0.3.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
37f8ebd3da90b0efa9fd6cc64a17e22b201d86cbf26d165ac9faf909868885b1
BLAKE2b-256 checksum
How to use checksums
21db992e7bafca771be8abb246b67acfe9a12a2126b7fdcaef230622c03a0b1d
Upload date
Uploaded using Trusted Publishing?
What is 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.5

Release files / zerocue-0.3.0-py3-none-any.whl

Download URL zerocue-0.3.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3af7f7837cfcbb19ea6c9a474da887cadee973b6ec3f1d81a016dd2d255ef692
BLAKE2b-256 checksum
How to use checksums
1ca40fc68c5640b9e003b775e71e37f91be1ebd35226235ad640013c070f6c80
Upload date
Uploaded using Trusted Publishing?
What is 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.5

Security for zerocue 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page