Library and executable for working with PLS and M3U playlist files.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

playlists.cabal 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. name: playlists
  2. version: 0.5.0.0
  3. synopsis: Library and executable for working with playlist files.
  4. homepage: https://github.com/pjones/playlists
  5. license: BSD3
  6. license-file: LICENSE
  7. author: Peter Jones <pjones@devalot.com>
  8. maintainer: Peter Jones <pjones@devalot.com>
  9. copyright: Copyright (c) 2013-2018 Peter Jones
  10. category: Text
  11. build-type: Simple
  12. cabal-version: 1.18
  13. tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1
  14. description:
  15. Playlists is a library for working with media playlist files. The
  16. original motivation for the library was extracting URLs for
  17. streaming radio stations that use PLS and M3U playlist files.
  18. .
  19. The package also includes an executable that can dump the URLs from
  20. a playlist file and convert between playlist file formats.
  21. .
  22. /Example:/
  23. .
  24. > import qualified Data.ByteString as BS
  25. > import Text.Playlist
  26. >
  27. > readPlaylist :: Format -> IO Playlist
  28. > readPlaylist fmt = do
  29. > content <- BS.getContents
  30. > case parsePlaylist fmt content of
  31. > Left err -> fail $ "failed to parse playlist on stdin: " ++ err
  32. > Right x -> return x
  33. .
  34. /Playlist Executable Examples:/
  35. .
  36. > $ playlist urls --format PLS < somefile.pls
  37. >
  38. > $ playlist convert --from PLS --to M3U < somefile.pls
  39. --------------------------------------------------------------------------------
  40. extra-source-files:
  41. README.md
  42. CHANGES.md
  43. test/*.m3u
  44. test/*.pls
  45. --------------------------------------------------------------------------------
  46. source-repository head
  47. type: git
  48. location: https://github.com/pjones/playlists.git
  49. --------------------------------------------------------------------------------
  50. flag maintainer
  51. description: Enable settings for the package maintainer.
  52. default: False
  53. manual: True
  54. ------------------------------------------------------------------------------
  55. -- You can disable the doctest test suite with -f-test-doctest
  56. flag test-doctest
  57. description: Run the source code through doctest when testing.
  58. default: True
  59. manual: True
  60. --------------------------------------------------------------------------------
  61. library
  62. exposed-modules:
  63. Text.Playlist
  64. other-modules:
  65. Text.Playlist.Internal.Attoparsec
  66. Text.Playlist.Internal.Format
  67. Text.Playlist.Internal.ReadWrite
  68. Text.Playlist.Internal.Resolve
  69. Text.Playlist.M3U.Reader
  70. Text.Playlist.M3U.Writer
  71. Text.Playlist.PLS.Reader
  72. Text.Playlist.PLS.Writer
  73. Text.Playlist.Types
  74. default-language: Haskell2010
  75. hs-source-dirs: src
  76. ghc-options: -Wall
  77. if flag(maintainer)
  78. ghc-options: -Werror
  79. build-depends: base >= 4.6 && < 5
  80. , attoparsec >= 0.10 && < 1.0
  81. , bytestring >= 0.10 && < 1.0
  82. , text >= 0.11 && < 1.3
  83. , word8 >= 0.0 && < 1.0
  84. , filepath >= 1.3 && < 2.0
  85. --------------------------------------------------------------------------------
  86. executable playlist
  87. default-language: Haskell2010
  88. hs-source-dirs: util
  89. main-is: playlist.hs
  90. ghc-options: -Wall -rtsopts
  91. if flag(maintainer)
  92. ghc-options: -Werror
  93. ghc-prof-options: -fprof-auto-top -fprof-cafs
  94. build-depends: base
  95. , bytestring
  96. , optparse-applicative >= 0.10 && < 0.15
  97. , playlists
  98. , text
  99. --------------------------------------------------------------------------------
  100. test-suite spec
  101. type: exitcode-stdio-1.0
  102. default-language: Haskell2010
  103. hs-source-dirs: test
  104. main-is: Main.hs
  105. ghc-options: -Wall
  106. other-modules:
  107. Examples
  108. Helper
  109. M3USpec
  110. PLSSpec
  111. ResolveSpec
  112. if flag(maintainer)
  113. ghc-options: -Werror
  114. build-depends: base
  115. , bytestring
  116. , filepath
  117. , hspec >= 1.4.0
  118. , playlists
  119. , text
  120. ------------------------------------------------------------------------------
  121. test-suite doctests
  122. type: exitcode-stdio-1.0
  123. default-language: Haskell2010
  124. hs-source-dirs: test
  125. main-is: doctest.hs
  126. ghc-options: -threaded
  127. if !flag(test-doctest)
  128. buildable: False
  129. else
  130. build-depends: base
  131. , doctest >= 0.9.11