The playlists package

[Tags:bsd3, library, program, test]

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.

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

Playlist Executable Examples:

 $ playlist urls --format PLS < somefile.pls

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

[Skip to Readme]

Properties

Versions 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.4.0.0
Change log CHANGES.md
Dependencies attoparsec (>=0.10 && <1.0), base (>=4.6 && <5), bytestring (>=0.10 && <1.0), filepath (>=1.3 && <2.0), optparse-applicative (>=0.10.0 && <0.13.0), playlists, text (>=0.11 && <1.3), word8 (>=0.0 && <1.0) [details]
License BSD3
Copyright Copyright (c) 2013-2016 Peter Jones
Author Peter Jones <pjones@devalot.com>
Maintainer Peter Jones <pjones@devalot.com>
Stability Unknown
Category Text
Home page https://github.com/pjones/playlists
Source repository head: git clone https://github.com/pjones/playlists.git
Uploaded Mon Nov 21 19:16:48 UTC 2016 by PeterJones
Distributions NixOS:0.4.0.0
Downloads 601 total (36 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2016-11-21 [all 1 reports]

Modules

[Index]

Flags

NameDescriptionDefaultType
maintainerEnable settings for the package maintainer.DisabledManual
test-doctestRun the source code through doctest when testing.EnabledManual

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for playlists

Readme for playlists-0.4.0.0

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