mirror of
https://github.com/hamidb80/sbttl
synced 2026-01-14 12:11:36 +00:00
No description
| samples | ||
| src | ||
| tests | ||
| .gitignore | ||
| readme.md | ||
| sbttl.nimble | ||
SuBTiTLe
subtile reader & writer for nimmers :D
Supported Formats
.srt.vtt
Usage
see tests/test.nim for now
API
types
TimeRange* = Slice[Duration]
Caption* = object
timeRange*: TimeRange
content*: string
functions
func parseVTT(content: string): seq[Caption]
func genVTT(captions: seq[Caption], meta = "", includeCaptionNumber = false): string
func parseSRT(content: string): seq[Caption]
func genSRT(cs: seq[Caption]): string