Crate subparse [−] [src]
This crate provides a common interface for popular subtitle formats (.srt
, .ssa
, .ass
, .idx
).
Files can be parsed, modified and saved again - some formats can be created from scratch. The focus is on non-destructive parsing, meaning that formatting and other information are preserved if not explicitely changed. Note that not all features of a specific subtitle format are supported.
Modules
errors |
Error-chain generated error types. |
timetypes |
Types that represent a time point, duration and time span. |
Structs
IdxFile |
Represents a reconstructable |
SrtFile |
Represents a reconstructable |
SsaFile |
Represents a reconstructable |
SubtitleEntry |
The data which can be read from/written to a subtitle file. |
Enums
SubtitleFormat |
All formats which are supported by this library. |
Traits
ParseSubtitle |
This trait is implemented for all subtitle files. |
ParseSubtitleString |
This trait is implemented for all text subtitle file types which can be parsed from a string. |
SubtitleFile |
This trait represents the generic interface for reading and writing subtitle information across all subtitle formats. |
Functions
get_subtitle_format_by_ending |
Returns the subtitle format by the file ending ( |
get_subtitle_format_by_ending_err |
Returns the subtitle format by the file ending ( |
parse_file_from_string |
Parse text subtitle, invoking the right parser given by |