BoldTranscriptsEx.WebVTT (bold_transcripts_ex v0.4.2)

Provides functionality for parsing WebVTT chapter information.

This module is designed to extract chapter information from WebVTT files, which are typically used for subtitles or chapter markers in video content.

Summary

Functions

Parses WebVTT content to extract chapters, converting them into a structured list.

Functions

chapters_to_webvtt(chapters)

parse_chapters(webvtt)

Parses WebVTT content to extract chapters, converting them into a structured list.

Each item in the returned list represents a chapter with its start time and title.

Parameters

  • webvtt: The WebVTT content as a string.

Returns

A list of maps, each containing :start and :title keys for a chapter.

Examples

iex> webvtt_content = "WEBVTT\n\n1\n00:00:03.000 --> 00:00:16.000\nComing soon: Back to Stanford"
iex> BoldTranscriptsEx.WebVTT.parse_chapters(webvtt_content)
[%{start: "0:03", end: "0:16", title: "Coming soon: Back to Stanford"}]