Library and executable for working with PLS and M3U playlist files.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Peter J. Jones bf358fd014
Update dependency: optparse-applicative
1 month ago
src/Text Compile with GHC 8.6.4, update build system 2 months ago
test Fix test examples 2 years ago
util Compile with GHC 8.6.4, update build system 2 months ago
.envrc Compile with GHC 8.6.4, update build system 2 months ago
.gitignore Compile with GHC 8.6.4, update build system 2 months ago
AUTHORS Update change log 2 years ago
CHANGES.md Bump version for 0.5.0.0 release 1 year ago
LICENSE Compile with GHC 8.6.4, update build system 2 months ago
README.md Remove references to Travis CI and Stack since I don't use them any more 4 months ago
Setup.hs Initial commit 6 years ago
default.nix Update dependency: optparse-applicative 1 month ago
playlists.cabal Update dependency: optparse-applicative 1 month ago
shell.nix Compile with GHC 8.6.4, update build system 2 months ago

README.md

Haskell Playlists Library and Tool

Playlists is a library for working with media playlist files. The original motivation for the library was extracting URLs for streaming radio stations that use PLS and M3U playlist files.

The package also includes an executable that can dump the URLs from a playlist file and convert between playlist file formats.

Supported Formats

Future Plans

Some playlist files can be really big. I plan on adding support for incremental parsing and generating via pipes at some point in the future.

Library Example

import qualified Data.ByteString as BS
import Text.Playlist

readPlaylist :: Format -> IO Playlist
readPlaylist fmt = do
  content <- BS.getContents
  case parsePlaylist fmt content of
    Left err -> fail $ "failed to parse playlist on stdin: " ++ err
    Right x  -> return x

Executable Example

$ playlist urls --format PLS < somefile.pls

$ playlist convert --from PLS --to M3U < somefile.pls