No description
Find a file
2024-01-25 19:33:18 +03:30
samples add vtt 2022-02-02 22:11:50 +03:30
src code quality 2024-01-25 19:32:19 +03:30
tests code quality 2024-01-25 19:32:19 +03:30
.gitignore add vtt 2022-02-02 22:11:50 +03:30
readme.md Update readme.md 2024-01-25 19:33:18 +03:30
sbttl.nimble code quality 2024-01-25 19:32:19 +03:30

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