-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A parser for .srt and .sub files
--
-- A basic .srt and .sub parser based on attoparsec and text
@package subtitleParser
@version 0.2
-- | ADT for .sub files. Also serves as a place to provide instance
-- declarations for the ADTs.
module Text.Subtitles.SUB.Datatypes
type Frame = Int
type Subtitles = [Line]
data Line
Line :: Frame -> Frame -> Text -> Line
startFrame :: Line -> Frame
finalFrame :: Line -> Frame
dialog :: Line -> Text
instance Show Line
-- | A basic parser for .sub files (subtitles) based on Attoparsec
-- and Text
module Text.Subtitles.SUB
-- | Given the example return the corresponding Line representation. At the
-- moment this not handles modifiers as underlines or bold text
parseSingleLine :: Parser Line
-- | Main parser of .sub files, given a .sub file it return a list of the
-- dialog lines
parseSUB :: Parser Subtitles
-- | ADT for .srt files. Also serves as a place to provide instance
-- declarations for the ADTs.
module Text.Subtitles.SRT.Datatypes
type Subtitles = [Line]
-- | The core of the parser. each one of the constructor representing one
-- part of the Line
data Line
Line :: Int -> Range -> Text -> Line
index :: Line -> Int
range :: Line -> Range
dialog :: Line -> Text
data Range
Range :: Time -> Time -> Range
from :: Range -> Time
to :: Range -> Time
data Time
Time :: Int -> Int -> Int -> Int -> Time
hour :: Time -> Int
minutes :: Time -> Int
seconds :: Time -> Int
frame :: Time -> Int
instance Eq Time
instance Ord Time
instance Eq Range
instance Ord Range
instance Eq Line
instance Ord Line
instance Show Line
instance Show Range
instance Show Time
-- | A basic parser for .srt files (subtitles) based on Attoparsec
-- and Text
module Text.Subtitles.SRT
-- | Main Parser, gives you a list of all the Lines of the subtitle. It
-- fails if the subtitle doesn't have any Lines.
parseSRT :: Parser Subtitles
-- | The individual Line parser. given the upper example return the
-- corresponding Line representation
parseSingleLine :: Parser Line