Skip to content

Commit eeac8a1

Browse files
committed
Update version, usage and history
1 parent 9dbfcf9 commit eeac8a1

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

docs/history.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
History
22
=======
33

4+
0.4.3 (22-11-2019) Few improvements
5+
-----------------------------------
6+
7+
* Parsing improvements, thanks to `@sontek <https://github.com/sontek>`_ (#18)
8+
* Add support for reading content from a file-like object, thanks to `@omerholz <https://github.com/omerholz>`_ (#23)
9+
* Documentation fixes thanks to `@sontek <https://github.com/sontek>`_ (#22) and `@netcmcc <https://github.com/netcmcc>`_ (#24)
10+
411
0.4.2 (08-06-2018) Rename of modules and usability improvements
512
---------------------------------------------------------------
613

docs/usage.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,24 @@ Reading WebVTT caption files
3030
'crédit de transcription'
3131
3232
33+
Reading WebVTT caption files from file-like object
34+
--------------------------------------------------
35+
36+
.. code-block:: python
37+
38+
import webvtt
39+
import requests
40+
from io import StringIO
41+
42+
payload = requests.get('http://subtitles.com/1234.vtt').text()
43+
buffer = StringIO(payload)
44+
45+
for caption in webvtt.read_buffer(buffer):
46+
print(caption.start)
47+
print(caption.end)
48+
print(caption.text)
49+
50+
3351
Creating captions
3452
-----------------
3553

webvtt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '0.4.2'
1+
__version__ = '0.4.3'
22

33
from .webvtt import *
44
from .segmenter import *

0 commit comments

Comments
 (0)