Library and executable for working with playlist files. https://github.com/pjones/playlists
|Latest on Hackage:||0.4.1.0|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
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.
- [PLS] 
- [M3U and M3U8] [M3U]
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.
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
$ playlist urls --format PLS < somefile.pls $ playlist convert --from PLS --to M3U < somefile.pls
Version 0.4.1.0 (February 5, 2017)
Remove redundant constraints as reported by GHC 8.X.
Widen dependency versions to latest available.
Version 0.4.0.0 (November 21, 2016)
resolvefunction. If you have a playlist that contains references to remote playlists, this new function will recursively download and process playlists until it has a flat playlist with no further remote references.
playlists-httppackage for an example of using the
parserForFormatfunction which directly exposes the
attoparsecparser for each playlist type. This should make it easy to write space efficient functions that parse playlists.
Version 0.3.0.0 (January 24, 2015)
- Update dependencies to recent versions (thanks to Wieland Hoffmann).