subtitleParser 0.4 → 0.4.1
raw patch · 4 files changed
+15/−11 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG +4/−0
- Text/Subtitles/SRT/Datatypes.hs +7/−7
- Text/Subtitles/SUB/Datatypes.hs +3/−3
- subtitleParser.cabal +1/−1
CHANGELOG view
@@ -1,3 +1,7 @@+0.4+ - Optional flags for SRT added, this modify where the text is displayed+ - Optional flags for SUB added.+ - Test case for the two parser based on the examples and HUnit 0.3 - Show instances for SRT now are simpler and more related on how is defined the ADT. this is a PARSER not a prettyPrinter nor a valid .srt producer
Text/Subtitles/SRT/Datatypes.hs view
@@ -17,13 +17,12 @@ -- * Datatypes Subtitles,- Rectangle(..), Line(..), Range(..),- Time(..)+ Time(..),+ Rectangle(..) ) where -import Data.List (intercalate) import Data.Text (Text, unpack) import Data.Attoparsec.Text (Parser) @@ -47,11 +46,12 @@ -- | The core of the parser. each one of the constructor representing one part -- of the Line data Line = Line- { index :: Int- , range :: Range- , geometry :: Maybe Rectangle - , dialog :: Text+ { index :: Int -- ^The absolute order of this line.+ , range :: Range -- ^The interval of time that the line is shown.+ , geometry :: Maybe Rectangle -- ^Sometimes text shouldn't be on the lower center.+ , dialog :: Text -- ^what to show in screen } deriving (Eq, Ord, Show) +-- |A subtitle is just a List of independent Lines that appear on screen type Subtitles = [Line]
Text/Subtitles/SUB/Datatypes.hs view
@@ -16,11 +16,11 @@ module Data.Text, -- * Datatypes- Frame, Subtitles,- Color,+ Line(..), TextProperty(..),- Line(..)+ Frame,+ Color ) where import Data.Text (Text)
subtitleParser.cabal view
@@ -1,5 +1,5 @@ name: subtitleParser-version: 0.4+version: 0.4.1 license: BSD3 license-file: LICENSE category: Text, Parsing