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 74e147065b
Remove references to Travis CI and Stack since I don't use them any more
3 週之前
src/Text Parse M3U tracks without title 2 年之前
test Fix test examples 2 年之前
util Improve the cabal file and general file organization 3 年之前
.gitignore Test against GHC 8.4.1 1 年之前
AUTHORS Update change log 2 年之前
CHANGES.md Bump version for 0.5.0.0 release 1 年之前
LICENSE Test against GHC 8.4.1 1 年之前
README.md Remove references to Travis CI and Stack since I don't use them any more 3 週之前
Setup.hs Initial commit 6 年之前
cabal.project Fix warnings in GHC 8.X, bump version 2 年之前
default.nix Test against GHC 8.4.1 1 年之前
playlists.cabal Disable doctests since they are failing when trying to parse import lines 1 年之前
playlists.nix Bump version for 0.5.0.0 release 1 年之前

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