Skip to main content

Add CART CHUNK to wave files.

Project description

Python CART CHUNK

Installation

Clone this repo and install using pip:

$ git clone https://github.com/maxtimbo/python_cart_chunk
$ cd python_cart_chunk
$ pip install .

Usage

You can use the CartChunk class to read CART CHUNK headers as well as riff and fmt data of a wave file:

from cart_chunk import CartChunk
from pathlib import Path

src = Path('/path/to/wave/file.wav')

wav = CartChunk(src)

if wav.is_scott:
    for key, value in wav.scott_data.items():
        print(f'{key:<20}: {value}')
else:
    print('Does not contain CART CHUNK')

for key, value in wav.riff_data.items():
    print(f'{key:<20}: {value}')

for key, value in wav.fmt_data.items():
    print(f'{key:<20}: {value}')

for key, value in wav.data_meta.items():
    print(f'{key:<20}: {value}')

Use the CartChunk class to write a new copy with the CART CHUNK (currently, only artist and title fields are supported):

from cart_chunk import NewCart

new_file = Path('/path/to/new/file.wav')

new_cart = NewCart(new_file, 'artist', 'title')

wav.write_copy(new_cart)

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

python_cart_chunk-0.0.1b1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

python_cart_chunk-0.0.1b1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file python_cart_chunk-0.0.1b1.tar.gz.

File metadata

  • Download URL: python_cart_chunk-0.0.1b1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for python_cart_chunk-0.0.1b1.tar.gz
Algorithm Hash digest
SHA256 608019e12cd40ada3149fc5f61d48cfe1eb5c4cf40e07c88ca68f01a79919920
MD5 d212a101cf69173ccb2ba7bf2beff853
BLAKE2b-256 6562386db7dea2ecbfc8251e29240e882d3e7944576b1d2dce1fe4501d138ede

See more details on using hashes here.

File details

Details for the file python_cart_chunk-0.0.1b1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_cart_chunk-0.0.1b1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d5f58cce75d245dd852f4e3865c3b96f014737f7fa77ca50042573884dc3362
MD5 5b3512585a0348a750efa255dc1e2be7
BLAKE2b-256 58f46839a32fe1b51661af57d769251df80aba6b14b9b7c88a970d259f88f895

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