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