Skip to content

Commit

Permalink
Update version, history and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
glut23 committed Mar 27, 2020
1 parent ee954c7 commit 62d864e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
10 changes: 10 additions & 0 deletions docs/history.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
History
=======

0.4.4 (27-03-2020)
------------------

* Allow parsing empty SBV captions, thanks to `@ishunyu <https://github.com/ishunyu>`_ (#26)
* Fix invalid time cues, thanks to `@sontek <https://github.com/sontek>`_ (#19)
* Enable pytest as test runner, thanks to `@sontek <https://github.com/sontek>`_ (#20)
* Packaging improvements
* Added Python 3.8 support
* Improve parsing empty lines

0.4.3 (22-11-2019) Few improvements
-----------------------------------

Expand Down
2 changes: 1 addition & 1 deletion webvtt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.4.3'
__version__ = '0.4.4'

from .webvtt import *
from .segmenter import *
Expand Down
10 changes: 5 additions & 5 deletions webvtt/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class SRTParser(TextBasedParser):
SRT parser.
"""

TIMEFRAME_LINE_PATTERN = re.compile('\s*(\d+:\d{2}:\d{2},\d{3})\s*-->\s*(\d+:\d{2}:\d{2},\d{3})')
TIMEFRAME_LINE_PATTERN = re.compile(r'\s*(\d+:\d{2}:\d{2},\d{3})\s*-->\s*(\d+:\d{2}:\d{2},\d{3})')

PARSER_OPTIONS = {
'ignore_empty_captions': True
Expand All @@ -155,9 +155,9 @@ class WebVTTParser(TextBasedParser):
WebVTT parser.
"""

TIMEFRAME_LINE_PATTERN = re.compile('\s*((?:\d+:)?\d{2}:\d{2}.\d{3})\s*-->\s*((?:\d+:)?\d{2}:\d{2}.\d{3})')
COMMENT_PATTERN = re.compile('NOTE(?:\s.+|$)')
STYLE_PATTERN = re.compile('STYLE[ \t]*$')
TIMEFRAME_LINE_PATTERN = re.compile(r'\s*((?:\d+:)?\d{2}:\d{2}.\d{3})\s*-->\s*((?:\d+:)?\d{2}:\d{2}.\d{3})')
COMMENT_PATTERN = re.compile(r'NOTE(?:\s.+|$)')
STYLE_PATTERN = re.compile(r'STYLE[ \t]*$')

def __init__(self):
super().__init__()
Expand Down Expand Up @@ -279,7 +279,7 @@ class SBVParser(TextBasedParser):
YouTube SBV parser.
"""

TIMEFRAME_LINE_PATTERN = re.compile('\s*(\d+:\d{2}:\d{2}.\d{3}),(\d+:\d{2}:\d{2}.\d{3})')
TIMEFRAME_LINE_PATTERN = re.compile(r'\s*(\d+:\d{2}:\d{2}.\d{3}),(\d+:\d{2}:\d{2}.\d{3})')

PARSER_OPTIONS = {
'ignore_empty_captions': True
Expand Down

0 comments on commit 62d864e

Please sign in to comment.