cdown / srt

A simple library and set of tools for parsing, modifying, and composing SRT files.
MIT License
473 stars 44 forks source link

Making a srt file from scratch and writing/saving as a file with Python #90

Closed ghostlyghastly closed 1 year ago

ghostlyghastly commented 1 year ago

Hi, I'm trying to convert csv files to srt format but from the beginner documentation I can't figure out how to just convert a list of lists with start time / end time / text into an srt file.

I also can't figure out how to write an SRT file.

cdown commented 1 year ago

Please read the quickstart here.

For reading from lists, construct a Subtitle object as desired and then run srt.compose.

You can also look at how it's done in examples in the srt_tools directory.