Skip to main content

CLI tool to export spotify playlists to flat files

Project description

XSPF generator

CLI to export your Spotify playlists to XSPF files for portable backups.

Prerequisites

Getting started

  1. Install uv if you do not already have it:
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Install dependencies into a uv-managed virtual environment:
    uv sync
    
  3. Run the exporter (uv will activate the env automatically):
    uv run python -m xspfify.main -o output
    
    • You will be prompted for your Spotify Client ID, Client Secret, and Redirect URL. The redirect URL must match one configured for your Spotify app (e.g. http://127.0.0.1:8000/callback).
    • Playlists will be written as .xspf files into the folder provided by -o (defaults to ./output).

Package for pipx

  1. Build distributable artifacts with uv:
    uv build
    
    This creates dist/*.whl and dist/*.tar.gz that pipx can consume.
  2. Share one of the artifacts (or host it in an index such as PyPI).
  3. On another machine, install and run the CLI with pipx:
    pipx install /path/to/dist/xspfify-0.1.0-py3-none-any.whl
    xspfify -o output
    
    Replace the path with the actual wheel location or git/URL you published. Because pyproject.toml defines a console script entry point, pipx will expose the xspfify command automatically.

Development workflows

  • Format / lint:
    uv run ruff format .
    uv run ruff check .
    
  • Add new dependencies:
    uv add package-name
    uv add --group dev dev-package-name
    
  • Update all locked dependencies:
    uv lock --upgrade
    

Notes

The generated playlists include artist, album, and track title for broad compatibility. Extend the payload by updating the get_playlist_tracks pipeline in spotify_utils.py and playlist_from_spotify_items in xspf_utils.py.

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

xspfify-0.1.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

xspfify-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file xspfify-0.1.0.tar.gz.

File metadata

  • Download URL: xspfify-0.1.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xspfify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e6c13f5c61176faa6585547256c7711205225173731bd12ce923223303a3214e
MD5 6aae921ca831f65732e9813b38706755
BLAKE2b-256 affedab553d28c80fc3139ef8485f3c9cd6a6deaba039646d8f04003de8ce36a

See more details on using hashes here.

Provenance

The following attestation bundles were made for xspfify-0.1.0.tar.gz:

Publisher: release.yml on aaronclong/xspfify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xspfify-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xspfify-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xspfify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5304b1d49d9f2947fab6c77d41e1b1b70528522fd0672ee92709d2d0375437d8
MD5 7c13bfe1a185ff3d16ca089c1c86e8a2
BLAKE2b-256 82cc381fada589166bdaaeef09c250a501ffa9d497a7265ac0fd057c03446314

See more details on using hashes here.

Provenance

The following attestation bundles were made for xspfify-0.1.0-py3-none-any.whl:

Publisher: release.yml on aaronclong/xspfify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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