From eeac8a180ee0cc95a49f3b2b907313e7f0e17185 Mon Sep 17 00:00:00 2001 From: Alejandro Mendez Date: Fri, 22 Nov 2019 18:32:21 +0100 Subject: [PATCH] Update version, usage and history --- docs/history.rst | 7 +++++++ docs/usage.rst | 18 ++++++++++++++++++ webvtt/__init__.py | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/history.rst b/docs/history.rst index 20fb79e..a405e00 100644 --- a/docs/history.rst +++ b/docs/history.rst @@ -1,6 +1,13 @@ History ======= +0.4.3 (22-11-2019) Few improvements +----------------------------------- + +* Parsing improvements, thanks to `@sontek `_ (#18) +* Add support for reading content from a file-like object, thanks to `@omerholz `_ (#23) +* Documentation fixes thanks to `@sontek `_ (#22) and `@netcmcc `_ (#24) + 0.4.2 (08-06-2018) Rename of modules and usability improvements --------------------------------------------------------------- diff --git a/docs/usage.rst b/docs/usage.rst index b4ce2ac..848ab8e 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -30,6 +30,24 @@ Reading WebVTT caption files 'crédit de transcription' +Reading WebVTT caption files from file-like object +-------------------------------------------------- + +.. code-block:: python + + import webvtt + import requests + from io import StringIO + + payload = requests.get('http://subtitles.com/1234.vtt').text() + buffer = StringIO(payload) + + for caption in webvtt.read_buffer(buffer): + print(caption.start) + print(caption.end) + print(caption.text) + + Creating captions ----------------- diff --git a/webvtt/__init__.py b/webvtt/__init__.py index 272f7e6..22b1fdf 100644 --- a/webvtt/__init__.py +++ b/webvtt/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.4.2' +__version__ = '0.4.3' from .webvtt import * from .segmenter import *