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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: m3uprsr-0.1.35.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/21.6.0

File hashes

Hashes for m3uprsr-0.1.35.tar.gz
Algorithm Hash digest
SHA256 864e8fc4de05942a1c513275e40d338c9f2ec149be690d015f6e013ab07c7e63
MD5 c875abe3966e213a8b457274b8bbcf32
BLAKE2b-256 d1f2b514c44eec69d90ca0bc762d37fa6128eee3302410bf290fd5d31845261a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: m3uprsr-0.1.35-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/21.6.0

File hashes

Hashes for m3uprsr-0.1.35-py3-none-any.whl
Algorithm Hash digest
SHA256 def703dfae1df2793ce0d04de269da4ac0f8a160f6a13e9fa806fb5e9451721d
MD5 82e21f5503ea890061793a0adca57f79
BLAKE2b-256 dd106506e9d80d5884bb29e18f4d0f3667cebaa757d6f9ad54bf4df7e887b2a3

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