packages feed

playlists-0.3.0.0: playlists.cabal

name:          playlists
version:       0.3.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,2014 Peter Jones
category:      Text
build-type:    Simple
cabal-version: >=1.8
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
  CHANGELOG
  test/*.m3u
  test/*.pls
  test/*.hs

--------------------------------------------------------------------------------
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 hlint test suite with -f-test-hlint
flag test-hlint
  description: Run the source code through hlint when testing.
  default: True
  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.Types
    Text.Playlist.M3U.Reader
    Text.Playlist.M3U.Writer
    Text.Playlist.PLS.Reader
    Text.Playlist.PLS.Writer
    Text.Playlist.Internal.Attoparsec

  hs-source-dirs: src
  ghc-options: -Wall
  ghc-prof-options: -fprof-auto-top
  extensions: OverloadedStrings

  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
  hs-source-dirs: ./
  main-is: playlist.hs
  ghc-options: -Wall -rtsopts 
  ghc-prof-options: -fprof-auto-top -fprof-cafs
  extensions: OverloadedStrings

  if flag(maintainer)
    ghc-options: -Werror

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

--------------------------------------------------------------------------------
test-suite spec
  type: exitcode-stdio-1.0
  hs-source-dirs: test
  main-is: Main.hs
  ghc-options: -Wall
  extensions: OverloadedStrings
  build-depends: base
               , bytestring
               , hspec >= 1.4.0
               , playlists

------------------------------------------------------------------------------
test-suite hlint
  type: exitcode-stdio-1.0
  hs-source-dirs: test
  main-is: hlint.hs
  ghc-options: -w

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

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

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