C# Class subtitleMemorize.SubtitleParserASS

Parse .ass/.ssa files
Inheritance: ISubtitleParser
Show file Open project: ChangSpivey/SubtitleMemorize Class Usage Examples

Public Methods

Method Description
GetFormatRegex ( LinkedList rawLines ) : string

Find "Format: " line in "rawLines" and create a regex matching to infomation in this format.

SubtitleParserASS ( ) : System
parse ( Settings settings, LinkedList rawLines ) : List

The general idea is to create a regex based of the "Format: "-line in .ass file. Which then can be used to easily filter the required information (namely timestamps, text and actor).

parse ( Settings settings, Stream stream, Encoding encoding ) : List

Parse ASS files.

parseTime ( String timeString ) : double

Parse SSA timestamps like "0:19:30.25" to seconds

Method Details

GetFormatRegex() public method

Find "Format: " line in "rawLines" and create a regex matching to infomation in this format.
public GetFormatRegex ( LinkedList rawLines ) : string
rawLines LinkedList Raw lines.
return string

SubtitleParserASS() public method

public SubtitleParserASS ( ) : System
return System

parse() public method

The general idea is to create a regex based of the "Format: "-line in .ass file. Which then can be used to easily filter the required information (namely timestamps, text and actor).
public parse ( Settings settings, LinkedList rawLines ) : List
settings Settings Settings.
rawLines LinkedList Raw lines.
return List

parse() public method

Parse ASS files.
public parse ( Settings settings, Stream stream, Encoding encoding ) : List
settings Settings Settings.
stream Stream Stream.
encoding System.Text.Encoding
return List

parseTime() public method

Parse SSA timestamps like "0:19:30.25" to seconds
public parseTime ( String timeString ) : double
timeString String
return double