Skip to main content

Simple cue file parser.

Project description

PyPI version shields.io

CueParser

Simple cue file parser and generator written in python. Parser outputs cue file content in plain text. Generator can create cue file from timed tracklist.

Installation

$ pip install CueParser

Usage

usage: cueparser.py [-h] [-H HEADER] [-t TRACK] file
positional arguments:
  file                  path to cue file

optional arguments:
  -h, --help            show this help message and exit
  -H HEADER, --header HEADER
                        header output template
  -t TRACK, --track TRACK
                        track output template
usage: cuegen.py [-h] [-p PERFORMER] [-t TITLE] [-a AUDIO_FILE] [-e AUDIO_FILE_EXT] [-f FILE]
options:
  -h, --help            show this help message and exit
  -p PERFORMER, --performer PERFORMER
                        PERFORMER
  -t TITLE, --title TITLE
                        TITLE
  -a AUDIO_FILE, --audio_file AUDIO_FILE
                        FILE
  -e AUDIO_FILE_EXT, --audio_file_ext AUDIO_FILE_EXT
                        FILE EXTENSION
  -f FILE, --file FILE  path to tracklist file

Example

$ cueparser.py file.cue

will output content with such template:

  • for header: %performer% - %title%\n%file%\n%tracks% (also can be %format%, %rem%, %songwriter%)

  • for tracks: %performer% - %title% (also can be %cuetime%, %offset%, %index%, %songwriter%)

$ cuegen.py -f file.txt

will create cue file from tracklist looks like:

[00:00] Artist 1 - Title 1
[03:00] Artist 2 - Title 2
etc...

or it can generate cuesheet from audacity labels file:

0.000000    1.000000    Artist 1 - Label 1
2.500000    4.200000    Artist 2 - Label 2
6.800000    8.000000    Artist 3 - Label 3

Library example

cuesheet = CueSheet()
cuesheet.setOutputFormat(args.header, args.track)
with open(cuefile, "r") as f:
    cuesheet.setData(f.read())

cuesheet.parse()
print(cuesheet.output())

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

cueparser-1.3.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

CueParser-1.3.2-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cueparser-1.3.2.tar.gz.

File metadata

  • Download URL: cueparser-1.3.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for cueparser-1.3.2.tar.gz
Algorithm Hash digest
SHA256 f939b04a2d62b1358903245e6082db873a8c5854e88a8c241a9c4830171930ce
MD5 d3a3d401cfe057f04ae75ab0c1d4f39d
BLAKE2b-256 e371bea3962abeb377c8f943ee3b34d112ee059d06818fe78d50a65b2f74f608

See more details on using hashes here.

File details

Details for the file CueParser-1.3.2-py2.py3-none-any.whl.

File metadata

  • Download URL: CueParser-1.3.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for CueParser-1.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 27e09a838dcabd46779872c9553f5bcf97692379a5b8dcf6a159250de7be5769
MD5 365f928f097a889291f300b3926f9ab9
BLAKE2b-256 0b2311bfd40727a2eb4683d36ea576eaa2a01ecb228d3108f09e2ea6a43fe57d

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