-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathplaylists.cabal
123 lines (113 loc) · 3.85 KB
/
playlists.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
cabal-version: 2.4
name: playlists
version: 0.5.2
homepage: https://github.com/pjones/playlists
bug-reports: https://github.com/pjones/playlists/issues
license: BSD-3-Clause
license-file: LICENSE
author: Peter Jones <[email protected]>
maintainer: Peter Jones <[email protected]>
copyright: Copyright (c) 2013-2024 Peter Jones
category: Text
build-type: Simple
tested-with: GHC==8.10.7, GHC==9.4.8, GHC==9.6.5, GHC==9.8.2
synopsis: Library and executable for working with playlist files.
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:
test/*.m3u
test/*.pls
extra-doc-files:
README.md
CHANGES.md
--------------------------------------------------------------------------------
source-repository head
type: git
location: https://github.com/pjones/playlists.git
--------------------------------------------------------------------------------
common dependencies
build-depends:
, attoparsec >=0.10 && <0.15
, base >=4.6 && <5
, bytestring >=0.10 && <0.13
, filepath >=1.3 && <1.6
, text >=0.11 && <2.2
, word8 >=0.0 && <0.2
--------------------------------------------------------------------------------
common options
default-language: Haskell2010
ghc-options:
-Wall -Wno-name-shadowing -Werror=incomplete-record-updates
-Werror=incomplete-uni-patterns -Werror=missing-home-modules
-Widentities -Wmissing-export-lists -Wredundant-constraints
--------------------------------------------------------------------------------
library
import: dependencies, options
hs-source-dirs: src
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
--------------------------------------------------------------------------------
executable playlist
import: dependencies, options
hs-source-dirs: util
main-is: playlist.hs
build-depends:
, optparse-applicative >=0.10 && <0.19
, playlists
--------------------------------------------------------------------------------
test-suite test
import: dependencies, options
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Main.hs
other-modules:
Examples
Helper
M3USpec
PLSSpec
ResolveSpec
build-depends:
, hspec >=1.4.0
, playlists
------------------------------------------------------------------------------
-- test-suite doctests
-- import: dependencies, options
-- type: exitcode-stdio-1.0
-- default-language: Haskell2010
-- hs-source-dirs: test
-- main-is: doctest.hs
-- ghc-options: -threaded
-- build-depends: doctest >=0.9.11 && <0.18