Skip to main content

No project description provided

Project description

m3u_prsr

Parses an M3U playlist file into a list of track objects.

Builds on the excellent work of dvndrsn's M3uParser.

Setup

Quickstart

# setup virtual environment
python -m venv .venv
source .venv/bin/activate

# install
python -m pip install m3u-prsr

# run
m3u-prsr ./tests/fixtures/test.m3u

Development

  • Setup environment
    # install dependencies
    poetry install
    
    # activate virtual environment
    poetry shell
    
  • Run script
    # run against the example m3u file
    λ app/main.py tests/fixtures/test.m3u
    Minus The Bear - Burying Luck.mp3 (0s)
    Minus The Bear - Ice Monster.mp3 (0s)
    Minus The Bear - Knights.mp3 (0s)
    Minus The Bear - White Mystery.mp3 (0s)
    Minus The Bear - Dr. l'Ling.mp3 (0s)
    Minus The Bear - Part 2.mp3 (0s)
    Minus The Bear - Throwin' Shapes.mp3 (0s)
    Minus The Bear - When We Escape.mp3 (0s)
    Minus The Bear - Double Vision Quest.mp3 (0s)
    Minus The Bear - Lotus.mp3 (0s)
    Parsed 10 tracks from ../tests/fixtures/test.m3u
    
  • Testing
    # generate tests
    cd app/
    hypothesis write main.parsem3u > ../tests/test_m3u_prsr.py
    
    # run specific test
    pytest -k test_m3u_prsr
    
    # install from testpypi
    pip install -i https://test.pypi.org/simple/ m3u-prsr
    

TODO

  • Issues
  • Button up error handling for internal field separators on m3u track names
  • Tests
  • CI/CD

Further Reading

The M3U File Format « The Matthew Nielsen Web Experience

Repositories | Documentation | Poetry - Python dependency management and packaging made easy

How to Build and Publish Python Packages With Poetry

Packaging your Python Project

python - Use poetry to create binary distributable with pyinstaller on package? - Stack Overflow

poetry publish raises HTTP 403 · Issue #6320 · python-poetry/poetry

Tips and Tricks - Test and publish your Python packages to PyPI with poetry and GitHub Actions | TestDriven.io

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

m3uprsr-0.1.36.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

m3uprsr-0.1.36-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file m3uprsr-0.1.36.tar.gz.

File metadata

  • Download URL: m3uprsr-0.1.36.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.0 CPython/3.11.6 Linux/6.2.0-1014-azure

File hashes

Hashes for m3uprsr-0.1.36.tar.gz
Algorithm Hash digest
SHA256 85a359b988e9ab8db651bc3e9859633446f1aecf8ec7a7e3c1170f7940464785
MD5 efcb027afc3cfba869f2d8019cc6d819
BLAKE2b-256 af0a1ea0a54a119d855027fe2c1b3b8816c2dd67875fb00a75fc31c87ce178d8

See more details on using hashes here.

File details

Details for the file m3uprsr-0.1.36-py3-none-any.whl.

File metadata

  • Download URL: m3uprsr-0.1.36-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.0 CPython/3.11.6 Linux/6.2.0-1014-azure

File hashes

Hashes for m3uprsr-0.1.36-py3-none-any.whl
Algorithm Hash digest
SHA256 e40e7e2b9dacfc265a9664d9152d5d0229a104f895cf7b66e30bc8a5542649d9
MD5 9d2a6008c76a98d37ff39887ac8297fb
BLAKE2b-256 9e7073fd27383141164e77e6b010f348c0bff7afe5ddd8ca286d53e846800ce0

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