Expand description
aspasia is a subtitle parsing library for Rust
Re-exports§
Modules§
- microdvd
- MicroDVD (.sub) format subtitle implementations
- plain
- Implementations for plain subtitles
- subrip
- SubRip (.srt) format subtitle implementations
- substation
- SubStation (.ass / .ssa) format subtitle implementations
- timing
- Types used for subtitle timing
- webvtt
- WebVTT (.vtt) format subtitle implementations
Structs§
- AssSubtitle
- Advanced SubStation Alpha v4+ (.ass) subtitle
- Micro
DvdSubtitle - Unmodified MicroDVD subtitle, with events timed in terms of frames.
- Plain
Subtitle - Basic subtitle data containing only the textual content and start/end timing with no style or formatting information
- SsaSubtitle
- SubStation Alpha v4 (.ssa) subtitle
- SubRip
Subtitle - SubRip (.srt) subtitle data, containing only a list of events.
- Timed
Micro DvdSubtitle - Timed version of MicroDVD (.sub) subtitle, using user-supplied framerate to calculate timings
- WebVtt
Subtitle - WebVTT (.vtt) subtitle data
Enums§
- Error
- Wrapper around errors that can potentially be produced by aspasia
- Format
- Supported file formats
- Timed
Subtitle File - Convenience interface for interacting with time-based subtitle files in a generic manner.
Traits§
- Subtitle
- Base trait for all subtitle implementations.
- Text
Event - Trait offering helper functions for textual subtitle events
- Text
Event Interface - Interface for getting/modifying textual subtitle event fields.
Required for implementation of
TextEvent
. - Text
Subtitle - Trait representing textual subtitle formats
- Timed
Event - Helper methods for time-based subtitle events.
- Timed
Event Interface - Interface for interacting with timed events.
Required for implementation of
TimedEvent
. - Timed
Subtitle - Time-based subtitle
Functions§
- detect_
format - Attempt to detect subtitle format from its extension first, then by file contents if that fails
- detect_
format_ by_ content - Attempt to detect subtitle format from file contents
- detect_
format_ by_ content_ with_ encoding - Attempt to detect subtitle format from file contents, using specified encoding to read file
- detect_
format_ by_ extension - Attempt to detect subtitle format using its file extension
- detect_
format_ from_ str - Attempt to detect subtitle format from text of the first few lines of the subtitle
- detect_
format_ with_ encoding - Attempt to detect subtitle format from its extension first, then by file contents using the given encoding if that fails