glut23 / webvtt-py

Read, write, convert and segment WebVTT caption files in Python.
MIT License
192 stars 56 forks source link

BytesIO support #32

Closed drsasa closed 5 months ago

drsasa commented 4 years ago

Hello,

Could we get support for BytesIO ?

Example:


import webvtt
import BytesIO

with open('test.srt', 'rb') as fh:
    buf = BytesIO(fh.read())

webvtt.from_srt(buf)

This is not use case but example of what i mean. Also would be nice to have save to BytesIO too.

Thanks and best all.

glut23 commented 5 months ago

Hi @drsasa apologies for the very late reply. Support for this has been added in version 0.5.1. Thanks.