Skip to main content

No project description provided

Project description

TagTor

JS & Rust parser for the TRAKTOR4 metadata tag

test_status last-commit license Rust

PyPi NPM



About

This is a parser for the TRAKTOR4 metadata tag, written in Rust. Wrapped for use in JavaScript, Python are available.

At the moment writing is not supported as the TRAKTOR4 metadata has an CHECKSUM field which is not trivial to calculate. If you have an idea how to do this, please open an issue or a pull request! Help is very welcome!

Usage

Python

import mutagen
from tagtor import parse_frame
# Get traktor4 metadata from a file somehow (example using mutagen)
traktor4_metadata = mutagen.File('path/to/file.mp3')['TRAKTOR4'].data
# Parse the metadata
frame = parse_frame(traktor4_metadata)

JavaScript

import { parse_frame } from 'tagtor';

// Get traktor4 metadata from a file somehow
const traktor4_metadata = getTraktor4MetadataFromFile();
// Parse the metadata
const frame = parse_frame(traktor4_metadata);

See type information to understand the structure of the returned frame object.

Rust

use tagtor::parse_frame;

// Get traktor4 metadata from a file somehow
let traktor4_metadata = get_traktor4_metadata_from_file();
// Parse the metadata
let frame = parse_frame(traktor4_metadata).unwrap();

Using wasm32 as target will pull in wasm-bindgen and tsify.

Development

This rust project can be compiled to a JavaScript module using wasm-pack:

wasm-pack build

Alternatively, you can also compile it as python module using maturin:

maturin build --release --features python-binding
# Or 
maturin develop --features python-binding

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

tagtor-0.2.1-cp311-cp311-manylinux_2_34_x86_64.whl (184.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

File details

Details for the file tagtor-0.2.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for tagtor-0.2.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 49518d9aafa03c4da502995fd73843dd836223a72324c4b476fef99c3eba7296
MD5 42623cf9c7ae27e836b6e1088b96cd16
BLAKE2b-256 13ad8b3afb6fbd1c2af4b41f520e67eb710e708b92edb48d091102f189216c11

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