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 e2dd4208bb
Disable doctests since they are failing when trying to parse import lines
1 year ago
src/Text Parse M3U tracks without title 2 years ago
test Fix test examples 2 years ago
util Improve the cabal file and general file organization 2 years ago
.gitignore Test against GHC 8.4.1 1 year ago
.travis.yml Test against GHC 8.4.1 1 year ago
AUTHORS Update change log 2 years ago
CHANGES.md Bump version for 0.5.0.0 release 1 year ago
LICENSE Test against GHC 8.4.1 1 year ago
README.md Add a Travis CI shield to the README 1 year ago
Setup.hs Initial commit 6 years ago
cabal.project Fix warnings in GHC 8.X, bump version 2 years ago
default.nix Test against GHC 8.4.1 1 year ago
playlists.cabal Disable doctests since they are failing when trying to parse import lines 1 year ago
playlists.nix Bump version for 0.5.0.0 release 1 year ago
stack.yaml Test against GHC 8.4.1 1 year ago

README.md

Haskell Playlists Library and Tool Travis

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 io-streams 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