srt_seconds: Parse components of a subtitle file

View source: R/parse.R

srt_secondsR Documentation

Parse components of a subtitle file

Description

Parse components of a subtitle file

Usage

srt_seconds(x)

srt_index(x)

srt_text(x, collapse = "\n")

Arguments

x

A character vector with the lines of an .srt file.

collapse

The character with which to separate subtitle lines.

Value

The parsed individual components of a subtitle: integer indexes, numeric times, and collapsed string subtitles.

Examples

# return individual components of each subtitle
x <- readLines(srt_example())
head(srt_seconds(x)[[1]])
head(srt_index(x))
head(srt_text(x))

srt documentation built on May 29, 2024, 9:35 a.m.