sbttl

read & write subtitle files with sbttl

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:25

Installation

nimble install sbttl
choosenim install sbttl
git clone https://github.com/hamidb80/sbttl

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
sbttl - - - - - - -

Source

Repository https://github.com/hamidb80/sbttl
Homepage https://github.com/hamidb80/sbttl
Registry Source nimble_official

README

SuBTiTLe

subtile reader & writer for nimmers :D

Supported Formats

  • [x] .srt
  • [x] .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