CueParser


NameCueParser JSON
Version 1.3.2 PyPI version JSON
download
home_pagehttps://github.com/artur-shaik/CueParser
SummarySimple cue file parser.
upload_time2024-06-08 07:22:53
maintainerNone
docs_urlNone
authorArtur Shaik
requires_pythonNone
licenseNone
keywords cue parser cdtool audio generator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://img.shields.io/pypi/v/CueParser.svg
   :alt: PyPI version shields.io
   :target: https://pypi.python.org/pypi/CueParser/

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
===============

.. code:: python 

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

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/artur-shaik/CueParser",
    "name": "CueParser",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "cue parser cdtool audio generator",
    "author": "Artur Shaik",
    "author_email": "ashaihullin@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e3/71/bea3962abeb377c8f943ee3b34d112ee059d06818fe78d50a65b2f74f608/cueparser-1.3.2.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/CueParser.svg\n   :alt: PyPI version shields.io\n   :target: https://pypi.python.org/pypi/CueParser/\n\nCueParser\n=========\n\nSimple cue file parser and generator written in python. \nParser outputs cue file content in plain text. Generator can create cue file from timed tracklist.\n\nInstallation\n============\n\n**$ pip install CueParser**\n\nUsage\n=====\n\n:: \n\n    usage: cueparser.py [-h] [-H HEADER] [-t TRACK] file\n\n::\n\n    positional arguments:\n      file                  path to cue file\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -H HEADER, --header HEADER\n                            header output template\n      -t TRACK, --track TRACK\n                            track output template\n\n:: \n\n    usage: cuegen.py [-h] [-p PERFORMER] [-t TITLE] [-a AUDIO_FILE] [-e AUDIO_FILE_EXT] [-f FILE]\n\n::\n\n    options:\n      -h, --help            show this help message and exit\n      -p PERFORMER, --performer PERFORMER\n                            PERFORMER\n      -t TITLE, --title TITLE\n                            TITLE\n      -a AUDIO_FILE, --audio_file AUDIO_FILE\n                            FILE\n      -e AUDIO_FILE_EXT, --audio_file_ext AUDIO_FILE_EXT\n                            FILE EXTENSION\n      -f FILE, --file FILE  path to tracklist file\n\nExample\n=======\n\n**$ cueparser.py file.cue**\n\nwill output content with such template: \n\n* for header: %performer% - %title%\\\\n%file%\\\\n%tracks% (also can be %format%, %rem%, %songwriter%) \n* for tracks: %performer% - %title% (also can be %cuetime%, %offset%, %index%, %songwriter%)\n\n**$ cuegen.py -f file.txt**\n\nwill create cue file from tracklist looks like:\n\n::\n\n    [00:00] Artist 1 - Title 1\n    [03:00] Artist 2 - Title 2\n    etc...\n\nor it can generate cuesheet from audacity labels file:\n\n::\n\n   0.000000    1.000000    Artist 1 - Label 1\n   2.500000    4.200000    Artist 2 - Label 2\n   6.800000    8.000000    Artist 3 - Label 3\n\n\nLibrary example\n===============\n\n.. code:: python \n\n    cuesheet = CueSheet()\n    cuesheet.setOutputFormat(args.header, args.track) \n    with open(cuefile, \"r\") as f: \n        cuesheet.setData(f.read())\n\n    cuesheet.parse()\n    print(cuesheet.output())\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Simple cue file parser.",
    "version": "1.3.2",
    "project_urls": {
        "Homepage": "https://github.com/artur-shaik/CueParser"
    },
    "split_keywords": [
        "cue",
        "parser",
        "cdtool",
        "audio",
        "generator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b2311bfd40727a2eb4683d36ea576eaa2a01ecb228d3108f09e2ea6a43fe57d",
                "md5": "365f928f097a889291f300b3926f9ab9",
                "sha256": "27e09a838dcabd46779872c9553f5bcf97692379a5b8dcf6a159250de7be5769"
            },
            "downloads": -1,
            "filename": "CueParser-1.3.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "365f928f097a889291f300b3926f9ab9",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 7080,
            "upload_time": "2024-06-08T07:22:51",
            "upload_time_iso_8601": "2024-06-08T07:22:51.719903Z",
            "url": "https://files.pythonhosted.org/packages/0b/23/11bfd40727a2eb4683d36ea576eaa2a01ecb228d3108f09e2ea6a43fe57d/CueParser-1.3.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e371bea3962abeb377c8f943ee3b34d112ee059d06818fe78d50a65b2f74f608",
                "md5": "d3a3d401cfe057f04ae75ab0c1d4f39d",
                "sha256": "f939b04a2d62b1358903245e6082db873a8c5854e88a8c241a9c4830171930ce"
            },
            "downloads": -1,
            "filename": "cueparser-1.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d3a3d401cfe057f04ae75ab0c1d4f39d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6344,
            "upload_time": "2024-06-08T07:22:53",
            "upload_time_iso_8601": "2024-06-08T07:22:53.374122Z",
            "url": "https://files.pythonhosted.org/packages/e3/71/bea3962abeb377c8f943ee3b34d112ee059d06818fe78d50a65b2f74f608/cueparser-1.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-08 07:22:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "artur-shaik",
    "github_project": "CueParser",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "cueparser"
}
        
Elapsed time: 3.20236s