packages feed

playlists-0.4.0.0: playlists.cabal

name:          playlists
version:       0.4.0.0
synopsis:      Library and executable for working with playlist files.
homepage:      https://github.com/pjones/playlists
license:       BSD3
license-file:  LICENSE
author:        Peter Jones <pjones@devalot.com>
maintainer:    Peter Jones <pjones@devalot.com>
copyright:     Copyright (c) 2013-2016 Peter Jones
category:      Text
build-type:    Simple
cabal-version: >= 1.18
description:
  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

--------------------------------------------------------------------------------
extra-source-files:
  README.md
  CHANGES.md
  test/*.m3u
  test/*.pls

--------------------------------------------------------------------------------
source-repository head
  type:     git
  location: https://github.com/pjones/playlists.git

--------------------------------------------------------------------------------
flag maintainer
  description: Enable settings for the package maintainer.
  default: False
  manual: True

------------------------------------------------------------------------------
-- You can disable the doctest test suite with -f-test-doctest
flag test-doctest
  description: Run the source code through doctest when testing.
  default: True
  manual: True

--------------------------------------------------------------------------------
library
  exposed-modules:
    Text.Playlist
  other-modules:
    Text.Playlist.Internal.Attoparsec
    Text.Playlist.Internal.Format
    Text.Playlist.Internal.ReadWrite
    Text.Playlist.Internal.Resolve
    Text.Playlist.M3U.Reader
    Text.Playlist.M3U.Writer
    Text.Playlist.PLS.Reader
    Text.Playlist.PLS.Writer
    Text.Playlist.Types

  default-language: Haskell2010
  hs-source-dirs: src
  ghc-options: -Wall

  if flag(maintainer)
    ghc-options: -Werror

  build-depends: base       >= 4.6   && < 5
               , attoparsec >= 0.10  && < 1.0
               , bytestring >= 0.10  && < 1.0
               , text       >= 0.11  && < 1.3
               , word8      >= 0.0   && < 1.0
               , filepath   >= 1.3   && < 2.0

--------------------------------------------------------------------------------
executable playlist
  default-language: Haskell2010
  hs-source-dirs: util
  main-is: playlist.hs
  ghc-options: -Wall -rtsopts

  if flag(maintainer)
    ghc-options: -Werror
    ghc-prof-options: -fprof-auto-top -fprof-cafs

  build-depends: base
               , bytestring
               , optparse-applicative >= 0.10.0 && < 0.13.0
               , playlists
               , text

--------------------------------------------------------------------------------
test-suite spec
  type: exitcode-stdio-1.0
  default-language: Haskell2010
  hs-source-dirs: test
  main-is: Main.hs
  ghc-options: -Wall

  other-modules:
    Examples
    Helper
    M3USpec
    PLSSpec
    ResolveSpec

  if flag(maintainer)
    ghc-options: -Werror

  build-depends: base
               , bytestring
               , filepath
               , hspec >= 1.4.0
               , playlists
               , text

------------------------------------------------------------------------------
test-suite doctests
  type: exitcode-stdio-1.0
  default-language: Haskell2010
  hs-source-dirs: test
  main-is: doctest.hs
  ghc-options: -threaded

  if !flag(test-doctest)
    buildable: False
  else
    build-depends: base
                 , doctest >= 0.9.11