Popularity
5.5
Declining
Activity
0.0
Stable
7
2
4

Monthly Downloads: 36
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Text     Playlists    
Latest version: v0.5.0.0
Add another 'playlists' Package

README

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