subtitleParser 0.1 → 0.1.1
raw patch · 3 files changed
+13/−5 lines, 3 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- Text/Subtitles/Datatypes.hs +6/−1
- Text/Subtitles/SRT.hs +5/−2
- subtitleParser.cabal +2/−2
Text/Subtitles/Datatypes.hs view
@@ -11,8 +11,12 @@ module Text.Subtitles.Datatypes (+ -- * Re-exported datatypes.+ module Data.Attoparsec.Text,+ module Data.Text,+ -- * Datatypes- Subtitles(..),+ Subtitles, Line(..), Range(..), Time(..)@@ -20,6 +24,7 @@ import Data.List (intercalate) import Data.Text (Text, unpack)+import Data.Attoparsec.Text (Parser) data Time = Time { hour :: Int
Text/Subtitles/SRT.hs view
@@ -13,6 +13,9 @@ -- * Terminology of the module -- $example + -- * Re-exported Datatypes+ module Text.Subtitles.Datatypes,+ -- * Main parsers parseSubtitles, parseSingleLine@@ -66,7 +69,7 @@ parseRange :: Parser Range parseRange = Range <$> parseTime <* arrowString <*> parseTime where- arrowString :: Parser T.Text+ arrowString :: Parser Text arrowString = string (T.pack " --> ") parseTime :: Parser Time@@ -77,7 +80,7 @@ {- return the dialog checking for newlines that could be in there. that why is - written in a monad instead of applicative. more efficient version welcome -}-parseSubs :: T.Text -> Parser T.Text+parseSubs :: Text -> Parser Text parseSubs t = do line <- takeWhile1 (not . isEndOfLine) endOfLine
subtitleParser.cabal view
@@ -1,5 +1,5 @@ name: subtitleParser-version: 0.1+version: 0.1.1 license: BSD3 license-file: LICENSE category: Text, Parsing@@ -23,7 +23,7 @@ Default: False library- build-depends: base >= 3 && < 5,+ build-depends: base < 5, containers, text >= 0.11.1.5, attoparsec