pycaption 2.2.14__tar.gz → 2.2.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. {pycaption-2.2.14 → pycaption-2.2.16}/LICENSE +1 -1
  2. {pycaption-2.2.14/pycaption.egg-info → pycaption-2.2.16}/PKG-INFO +13 -4
  3. {pycaption-2.2.14 → pycaption-2.2.16}/README.rst +2 -2
  4. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/scc/__init__.py +1 -2
  5. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/scc/constants.py +1 -1
  6. {pycaption-2.2.14 → pycaption-2.2.16/pycaption.egg-info}/PKG-INFO +13 -4
  7. {pycaption-2.2.14 → pycaption-2.2.16}/setup.py +1 -1
  8. {pycaption-2.2.14 → pycaption-2.2.16}/tests/fixtures/scc.py +8 -0
  9. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_scc.py +7 -1
  10. {pycaption-2.2.14 → pycaption-2.2.16}/MANIFEST.in +0 -0
  11. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/__init__.py +0 -0
  12. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/base.py +0 -0
  13. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/dfxp/__init__.py +0 -0
  14. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/dfxp/base.py +0 -0
  15. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/dfxp/extras.py +0 -0
  16. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/english.pickle +0 -0
  17. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/exceptions.py +0 -0
  18. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/geometry.py +0 -0
  19. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/microdvd.py +0 -0
  20. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/sami.py +0 -0
  21. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/scc/specialized_collections.py +0 -0
  22. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/scc/state_machines.py +0 -0
  23. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/scc/translator.py +0 -0
  24. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/srt.py +0 -0
  25. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/transcript.py +0 -0
  26. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/utils.py +0 -0
  27. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption/webvtt.py +0 -0
  28. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption.egg-info/SOURCES.txt +0 -0
  29. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption.egg-info/dependency_links.txt +0 -0
  30. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption.egg-info/requires.txt +0 -0
  31. {pycaption-2.2.14 → pycaption-2.2.16}/pycaption.egg-info/top_level.txt +0 -0
  32. {pycaption-2.2.14 → pycaption-2.2.16}/setup.cfg +0 -0
  33. {pycaption-2.2.14 → pycaption-2.2.16}/tests/__init__.py +0 -0
  34. {pycaption-2.2.14 → pycaption-2.2.16}/tests/conftest.py +0 -0
  35. {pycaption-2.2.14 → pycaption-2.2.16}/tests/fixtures/__init__.py +0 -0
  36. {pycaption-2.2.14 → pycaption-2.2.16}/tests/fixtures/dfxp.py +0 -0
  37. {pycaption-2.2.14 → pycaption-2.2.16}/tests/fixtures/microdvd.py +0 -0
  38. {pycaption-2.2.14 → pycaption-2.2.16}/tests/fixtures/sami.py +0 -0
  39. {pycaption-2.2.14 → pycaption-2.2.16}/tests/fixtures/srt.py +0 -0
  40. {pycaption-2.2.14 → pycaption-2.2.16}/tests/fixtures/translated_scc.py +0 -0
  41. {pycaption-2.2.14 → pycaption-2.2.16}/tests/fixtures/webvtt.py +0 -0
  42. {pycaption-2.2.14 → pycaption-2.2.16}/tests/mixins.py +0 -0
  43. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_base.py +0 -0
  44. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_dfxp.py +0 -0
  45. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_dfxp_conversion.py +0 -0
  46. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_dfxp_extras.py +0 -0
  47. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_functions.py +0 -0
  48. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_geometry.py +0 -0
  49. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_microdvd.py +0 -0
  50. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_microdvd_conversion.py +0 -0
  51. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_sami.py +0 -0
  52. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_sami_conversion.py +0 -0
  53. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_scc_conversion.py +0 -0
  54. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_scc_translator.py +0 -0
  55. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_srt.py +0 -0
  56. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_srt_conversion.py +0 -0
  57. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_webvtt.py +0 -0
  58. {pycaption-2.2.14 → pycaption-2.2.16}/tests/test_webvtt_conversion.py +0 -0
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright (c) 2012-2024 PBS.org
189
+ Copyright (c) 2012-2025 PBS.org
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pycaption
3
- Version: 2.2.14
3
+ Version: 2.2.16
4
4
  Summary: Closed caption converter
5
5
  Author: Joe Norton
6
6
  Author-email: joey@nortoncrew.com
@@ -30,6 +30,15 @@ Requires-Dist: pytest; extra == "dev"
30
30
  Requires-Dist: pytest-lazy-fixture; extra == "dev"
31
31
  Provides-Extra: transcript
32
32
  Requires-Dist: nltk==3.8.0; extra == "transcript"
33
+ Dynamic: author
34
+ Dynamic: author-email
35
+ Dynamic: classifier
36
+ Dynamic: description
37
+ Dynamic: project-url
38
+ Dynamic: provides-extra
39
+ Dynamic: requires-dist
40
+ Dynamic: requires-python
41
+ Dynamic: summary
33
42
 
34
43
  py-caption
35
44
  ==========
@@ -40,7 +49,7 @@ py-caption
40
49
  to read content into a CaptionSet object, and then use one of the Writers to
41
50
  output the CaptionSet into captions of your desired format.
42
51
 
43
- Tested with Python versions 3.6, 3.7, 3.8, 3.9, 3.10 and 3.11.
52
+ Tested with Python versions 3.8, 3.9, 3.10, 3.11 and 3.12.
44
53
  (for Python 2 use pycaption < 1.0.0)
45
54
 
46
55
  For details, see the `documentation <http://pycaption.readthedocs.org>`__.
@@ -48,7 +57,7 @@ For details, see the `documentation <http://pycaption.readthedocs.org>`__.
48
57
  License
49
58
  -------
50
59
 
51
- This module is Copyright (c) 2012-2024 PBS.org and is available under the `Apache
60
+ This module is Copyright (c) 2012-2025 PBS.org and is available under the `Apache
52
61
  License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`__.
53
62
 
54
63
  .. |Build Status| image:: https://github.com/pbs/pycaption/actions/workflows/unit_tests.yml/badge.svg
@@ -7,7 +7,7 @@ py-caption
7
7
  to read content into a CaptionSet object, and then use one of the Writers to
8
8
  output the CaptionSet into captions of your desired format.
9
9
 
10
- Tested with Python versions 3.6, 3.7, 3.8, 3.9, 3.10 and 3.11.
10
+ Tested with Python versions 3.8, 3.9, 3.10, 3.11 and 3.12.
11
11
  (for Python 2 use pycaption < 1.0.0)
12
12
 
13
13
  For details, see the `documentation <http://pycaption.readthedocs.org>`__.
@@ -15,7 +15,7 @@ For details, see the `documentation <http://pycaption.readthedocs.org>`__.
15
15
  License
16
16
  -------
17
17
 
18
- This module is Copyright (c) 2012-2024 PBS.org and is available under the `Apache
18
+ This module is Copyright (c) 2012-2025 PBS.org and is available under the `Apache
19
19
  License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`__.
20
20
 
21
21
  .. |Build Status| image:: https://github.com/pbs/pycaption/actions/workflows/unit_tests.yml/badge.svg
@@ -367,13 +367,12 @@ class SCCReader(BaseReader):
367
367
  # doubled special characters and doubled extended characters
368
368
  # with only one member of each pair being displayed.
369
369
 
370
- doubled_types = word != "94a1" and word in COMMANDS or _is_pac_command(word)
370
+ doubled_types = (word != "94a1" and word in COMMANDS) or _is_pac_command(word) or word in SPECIAL_CHARS
371
371
  if self.double_starter:
372
372
  doubled_types = (
373
373
  doubled_types
374
374
  or word in EXTENDED_CHARS
375
375
  or word == "94a1"
376
- or word in SPECIAL_CHARS
377
376
  )
378
377
 
379
378
  if word in CUE_STARTING_COMMAND and word != self.last_command:
@@ -988,7 +988,7 @@ HEADER = 'Scenarist_SCC V1.0'
988
988
 
989
989
  # taken from
990
990
  # http://www.theneitherworld.com/mcpoodle/SCC_TOOLS/DOCS/CC_CHARS.HTML
991
- INCONVERTIBLE_TO_ASCII_EXTENDED_CHARS_ASSOCIATION = {
991
+ SUBSTITUTE_CHARACTERS = {
992
992
  '¡': ["!", "i"], # inverted exclamation mark
993
993
  '¤': ["C"], # currency
994
994
  '¥': ["Y"], # yen
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pycaption
3
- Version: 2.2.14
3
+ Version: 2.2.16
4
4
  Summary: Closed caption converter
5
5
  Author: Joe Norton
6
6
  Author-email: joey@nortoncrew.com
@@ -30,6 +30,15 @@ Requires-Dist: pytest; extra == "dev"
30
30
  Requires-Dist: pytest-lazy-fixture; extra == "dev"
31
31
  Provides-Extra: transcript
32
32
  Requires-Dist: nltk==3.8.0; extra == "transcript"
33
+ Dynamic: author
34
+ Dynamic: author-email
35
+ Dynamic: classifier
36
+ Dynamic: description
37
+ Dynamic: project-url
38
+ Dynamic: provides-extra
39
+ Dynamic: requires-dist
40
+ Dynamic: requires-python
41
+ Dynamic: summary
33
42
 
34
43
  py-caption
35
44
  ==========
@@ -40,7 +49,7 @@ py-caption
40
49
  to read content into a CaptionSet object, and then use one of the Writers to
41
50
  output the CaptionSet into captions of your desired format.
42
51
 
43
- Tested with Python versions 3.6, 3.7, 3.8, 3.9, 3.10 and 3.11.
52
+ Tested with Python versions 3.8, 3.9, 3.10, 3.11 and 3.12.
44
53
  (for Python 2 use pycaption < 1.0.0)
45
54
 
46
55
  For details, see the `documentation <http://pycaption.readthedocs.org>`__.
@@ -48,7 +57,7 @@ For details, see the `documentation <http://pycaption.readthedocs.org>`__.
48
57
  License
49
58
  -------
50
59
 
51
- This module is Copyright (c) 2012-2024 PBS.org and is available under the `Apache
60
+ This module is Copyright (c) 2012-2025 PBS.org and is available under the `Apache
52
61
  License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`__.
53
62
 
54
63
  .. |Build Status| image:: https://github.com/pbs/pycaption/actions/workflows/unit_tests.yml/badge.svg
@@ -20,7 +20,7 @@ transcript_dependencies = ["nltk==3.8.0"]
20
20
 
21
21
  setup(
22
22
  name="pycaption",
23
- version="2.2.14",
23
+ version="2.2.16",
24
24
  description="Closed caption converter",
25
25
  long_description=open(README_PATH).read(),
26
26
  author="Joe Norton",
@@ -144,6 +144,14 @@ Scenarist_SCC V1.0
144
144
 
145
145
  00:00:13;07 9425 9425 94ad 94ad 9470 9470 c1c2 c3c4 c580 91bf
146
146
 
147
+ 00:00:13;15 9425 9425 94ad 94ad 9470 9470 9137
148
+
149
+ 00:00:13;20 9425 9425 94ad 94ad 9470 9470 9137 9137
150
+
151
+ 00:00:13;25 9425 9425 94ad 94ad 9470 9470 9137 9137 9137
152
+
153
+ 00:00:13;40 9425 9425 94ad 94ad 9470 9470 9137 9137 9137 9137
154
+
147
155
  00:00:14;07 9425 9425 94ad 94ad 9470 9470 9220 9220 92a1 92a2 92a7
148
156
 
149
157
  00:00:17;01 9426 9426 94ad 94ad 9470 9470 57c8 4552 4520 d94f d5a7 5245 20d3 54c1 cec4 49ce c720 ce4f 572c
@@ -419,8 +419,12 @@ class TestCoverageOnly:
419
419
  "AND IMPROVING THE LIVES OF ALL",
420
420
  "WE SERVE.",
421
421
  "®°½",
422
- "®°½½",
422
+ "®°½",
423
423
  "ABû",
424
+ '♪',
425
+ '♪',
426
+ '♪♪',
427
+ '♪♪',
424
428
  "ÁÉÓ¡",
425
429
  "WHERE YOU'RE STANDING NOW,",
426
430
  "LOOKING OUT THERE, THAT'S AL",
@@ -430,6 +434,8 @@ class TestCoverageOnly:
430
434
  "And wildlife.",
431
435
  ">> Bike Iowa, your source for",
432
436
  ]
437
+ for x in actual_texts:
438
+ print(x)
433
439
  assert expected_texts == actual_texts
434
440
 
435
441
  def test_multiple_formats(self, sample_scc_multiple_formats):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes