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…

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.2.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

CueParser-1.2.0-py2.py3-none-any.whl (6.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file CueParser-1.2.0.tar.gz.

File metadata

  • Download URL: CueParser-1.2.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for CueParser-1.2.0.tar.gz
Algorithm Hash digest
SHA256 4498b0cd92973d273ed1b9b1d2696c314b40ddeefd132d42654e134e66486dbd
MD5 37a7c74ece0829ce96ebb51621410eca
BLAKE2b-256 cfd83ed1e545dcaedb3f5b24937076c8260099258acb4bd07d97a90cc442a522

See more details on using hashes here.

File details

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

File metadata

  • Download URL: CueParser-1.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for CueParser-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 359a2c98330c3ce2b88732d1b4209feaa5aca3b7584c2124b8b81cea84817462
MD5 d2dd23aded06470bc1129fc5d70f877d
BLAKE2b-256 1329d250e134f9183849fc912d17de1ce2a612e739180b00fb349e3f775e07c3

See more details on using hashes here.

Supported by

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