From 4b2d07224a070db4b20080e756ad12bd6a01e091 Mon Sep 17 00:00:00 2001 From: OlteanuRares Date: Thu, 1 Feb 2024 14:23:44 +0200 Subject: [PATCH 1/3] OCTO-10927-skip-duplicated-extended-characters --- pycaption/scc/__init__.py | 2 +- tests/test_scc.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pycaption/scc/__init__.py b/pycaption/scc/__init__.py index c5d864ad..222c3bc6 100644 --- a/pycaption/scc/__init__.py +++ b/pycaption/scc/__init__.py @@ -339,7 +339,7 @@ def _handle_double_command(self, word): # same as the first. # Also like codes, Special Characters are always doubled up, # with only one member of each pair being displayed. - if word in COMMANDS or _is_pac_command(word) or word in SPECIAL_CHARS: + if word in COMMANDS or _is_pac_command(word) or word in SPECIAL_CHARS or word in EXTENDED_CHARS: if word == self.last_command: self.last_command = '' return True diff --git a/tests/test_scc.py b/tests/test_scc.py index 25a6abd4..21c3c199 100644 --- a/tests/test_scc.py +++ b/tests/test_scc.py @@ -279,7 +279,8 @@ def test_freeze_rollup_captions_contents(self, sample_scc_roll_up_ru2): 'WE SERVE.', '®°½', 'ABû', - 'ÁÁÉÓ¡', + # 'ÁÁÉÓ¡', + 'ÁÉÓ¡', "WHERE YOU'RE STANDING NOW,", "LOOKING OUT THERE, THAT'S AL", 'THE CROWD.', @@ -288,6 +289,9 @@ def test_freeze_rollup_captions_contents(self, sample_scc_roll_up_ru2): 'And wildlife.', '>> Bike Iowa, your source for', ] + print("==========") + from pprint import pprint + pprint(actual_texts) assert expected_texts == actual_texts def test_multiple_formats(self, sample_scc_multiple_formats): From 62f067bd60291f83d5422af6f74d479630b40dfe Mon Sep 17 00:00:00 2001 From: OlteanuRares Date: Thu, 1 Feb 2024 16:47:18 +0200 Subject: [PATCH 2/3] remove leftovers --- tests/test_scc.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/test_scc.py b/tests/test_scc.py index 21c3c199..f5d6698b 100644 --- a/tests/test_scc.py +++ b/tests/test_scc.py @@ -279,7 +279,6 @@ def test_freeze_rollup_captions_contents(self, sample_scc_roll_up_ru2): 'WE SERVE.', '®°½', 'ABû', - # 'ÁÁÉÓ¡', 'ÁÉÓ¡', "WHERE YOU'RE STANDING NOW,", "LOOKING OUT THERE, THAT'S AL", @@ -289,9 +288,6 @@ def test_freeze_rollup_captions_contents(self, sample_scc_roll_up_ru2): 'And wildlife.', '>> Bike Iowa, your source for', ] - print("==========") - from pprint import pprint - pprint(actual_texts) assert expected_texts == actual_texts def test_multiple_formats(self, sample_scc_multiple_formats): From bb2d13c8d7b7e8b2e89b2aa0a6264ebda4363901 Mon Sep 17 00:00:00 2001 From: OlteanuRares Date: Fri, 2 Feb 2024 10:04:21 +0200 Subject: [PATCH 3/3] bump version to 2.2.4.dev --- docs/changelog.rst | 7 +++++-- docs/conf.py | 4 ++-- setup.py | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 0900599f..0e30cf30 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,9 +1,12 @@ Changelog --------- +2.2.4 +^^^^^ +- Skip duplicated extended characters. + 2.2.3 ^^^^^ -- Add new substitute character to ignore before extended character - in SCC input files +- Add new substitute character to ignore before extended character in SCC input files 2.2.2 ^^^^^ diff --git a/docs/conf.py b/docs/conf.py index 56adf280..3d8b4b2a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,9 +53,9 @@ # built documents. # # The short X.Y version. -version = '2.2.3' +version = '2.2.4' # The full version, including alpha/beta/rc tags. -release = '2.2.3' +release = '2.2.4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index 312a170c..a5c792db 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup( name='pycaption', - version='2.2.3', + version='2.2.4.dev', description='Closed caption converter', long_description=open(README_PATH).read(), author='Joe Norton',