subtitles: Create a 'subtitles' object

Description Usage Arguments Value

View source: R/read_subtitles.R

Description

A subtitles is a special form of tibble.

Usage

1
subtitles(text, timecode.in, timecode.out, id, metadata = data.frame())

Arguments

text

a character vector of subtitles text content.

timecode.in

a character vector giving the time that the subtitles appear on the screen. The format must be "HH:MM:SS.mS".

timecode.out

a character vector giving the time that the subtitles disappear. The format must be "HH:MM:SS.mS".

id

a vector of IDs for subtitles. If not provided it is generated automatically from timecode.in order.

metadata

a one-row dataframe or tibble, or any object that can be coerced into a one-row tibble by link[tibble]{as_tibble}.

Value

a subtitles object i.e. a tibble with at least 4 columns containing IDs, timecodes and text of the subtitles and optionally metadata in extra columns.


fkeck/subtools documentation built on Dec. 2, 2019, 3:19 a.m.