PySSTV 0.5.9__tar.gz → 0.5.10__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 (32) hide show
  1. {pysstv-0.5.9 → pysstv-0.5.10}/PKG-INFO +12 -10
  2. {pysstv-0.5.9 → pysstv-0.5.10}/PySSTV.egg-info/PKG-INFO +12 -10
  3. {pysstv-0.5.9 → pysstv-0.5.10}/PySSTV.egg-info/SOURCES.txt +1 -1
  4. pysstv-0.5.10/PySSTV.egg-info/entry_points.txt +2 -0
  5. pysstv-0.5.10/PySSTV.egg-info/requires.txt +1 -0
  6. {pysstv-0.5.9 → pysstv-0.5.10}/README.md +1 -1
  7. pysstv-0.5.10/pyproject.toml +34 -0
  8. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/__main__.py +3 -8
  9. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/color.py +0 -2
  10. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/grayscale.py +1 -2
  11. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/sstv.py +5 -8
  12. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/tests/test_color.py +1 -1
  13. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/tests/test_sstv.py +2 -2
  14. pysstv-0.5.9/PySSTV.egg-info/requires.txt +0 -1
  15. pysstv-0.5.9/pyproject.toml +0 -19
  16. pysstv-0.5.9/setup.py +0 -30
  17. {pysstv-0.5.9 → pysstv-0.5.10}/LICENSE.txt +0 -0
  18. {pysstv-0.5.9 → pysstv-0.5.10}/MANIFEST.in +0 -0
  19. {pysstv-0.5.9 → pysstv-0.5.10}/PySSTV.egg-info/dependency_links.txt +0 -0
  20. {pysstv-0.5.9 → pysstv-0.5.10}/PySSTV.egg-info/top_level.txt +0 -0
  21. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/__init__.py +0 -0
  22. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/examples/__init__.py +0 -0
  23. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/examples/codegen.py +0 -0
  24. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/examples/get_floats.py +0 -0
  25. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/examples/get_freq_bits.py +0 -0
  26. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/examples/gimp-plugin.py +0 -0
  27. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/examples/overlay.py +0 -0
  28. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/examples/pyaudio_sstv.py +0 -0
  29. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/examples/repeater.py +0 -0
  30. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/tests/__init__.py +0 -0
  31. {pysstv-0.5.9 → pysstv-0.5.10}/pysstv/tests/common.py +0 -0
  32. {pysstv-0.5.9 → pysstv-0.5.10}/setup.cfg +0 -0
@@ -1,17 +1,19 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pySSTV
3
- Version: 0.5.9
3
+ Version: 0.5.10
4
4
  Summary: Python classes for generating Slow-scan Television transmissions
5
- Home-page: https://github.com/dnet/pySSTV
6
- Author: András Veres-Szentkirályi
7
- Author-email: vsza@vsza.hu
8
- Requires-Python: >=3.10
5
+ Author-email: András Veres-Szentkirályi <vsza@vsza.hu>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/dnet/pySSTV
8
+ Keywords: HAM,SSTV,slow-scan,television,Scottie,Martin,Robot,Pasokon
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Topic :: Communications :: Ham Radio
11
+ Classifier: Topic :: Multimedia :: Video :: Conversion
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.11
9
14
  Description-Content-Type: text/markdown
10
15
  License-File: LICENSE.txt
11
- Requires-Dist: pillow==12.3.0
12
- Dynamic: author
13
- Dynamic: author-email
14
- Dynamic: home-page
16
+ Requires-Dist: pillow==13.0.0
15
17
  Dynamic: license-file
16
18
 
17
19
  SSTV generator in pure Python
@@ -98,5 +100,5 @@ Useful links
98
100
  Dependencies
99
101
  ------------
100
102
 
101
- - Python 3.5 or later
103
+ - Python 3.11 or later
102
104
  - Python Imaging Library (Debian/Ubuntu package: `python3-pil`)
@@ -1,17 +1,19 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pySSTV
3
- Version: 0.5.9
3
+ Version: 0.5.10
4
4
  Summary: Python classes for generating Slow-scan Television transmissions
5
- Home-page: https://github.com/dnet/pySSTV
6
- Author: András Veres-Szentkirályi
7
- Author-email: vsza@vsza.hu
8
- Requires-Python: >=3.10
5
+ Author-email: András Veres-Szentkirályi <vsza@vsza.hu>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/dnet/pySSTV
8
+ Keywords: HAM,SSTV,slow-scan,television,Scottie,Martin,Robot,Pasokon
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Topic :: Communications :: Ham Radio
11
+ Classifier: Topic :: Multimedia :: Video :: Conversion
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.11
9
14
  Description-Content-Type: text/markdown
10
15
  License-File: LICENSE.txt
11
- Requires-Dist: pillow==12.3.0
12
- Dynamic: author
13
- Dynamic: author-email
14
- Dynamic: home-page
16
+ Requires-Dist: pillow==13.0.0
15
17
  Dynamic: license-file
16
18
 
17
19
  SSTV generator in pure Python
@@ -98,5 +100,5 @@ Useful links
98
100
  Dependencies
99
101
  ------------
100
102
 
101
- - Python 3.5 or later
103
+ - Python 3.11 or later
102
104
  - Python Imaging Library (Debian/Ubuntu package: `python3-pil`)
@@ -2,7 +2,6 @@ LICENSE.txt
2
2
  MANIFEST.in
3
3
  README.md
4
4
  pyproject.toml
5
- setup.py
6
5
  PySSTV.egg-info/PKG-INFO
7
6
  PySSTV.egg-info/SOURCES.txt
8
7
  PySSTV.egg-info/dependency_links.txt
@@ -11,6 +10,7 @@ PySSTV.egg-info/top_level.txt
11
10
  pySSTV.egg-info/PKG-INFO
12
11
  pySSTV.egg-info/SOURCES.txt
13
12
  pySSTV.egg-info/dependency_links.txt
13
+ pySSTV.egg-info/entry_points.txt
14
14
  pySSTV.egg-info/requires.txt
15
15
  pySSTV.egg-info/top_level.txt
16
16
  pysstv/__init__.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pysstv = pysstv.__main__:main
@@ -0,0 +1 @@
1
+ pillow==13.0.0
@@ -82,5 +82,5 @@ Useful links
82
82
  Dependencies
83
83
  ------------
84
84
 
85
- - Python 3.5 or later
85
+ - Python 3.11 or later
86
86
  - Python Imaging Library (Debian/Ubuntu package: `python3-pil`)
@@ -0,0 +1,34 @@
1
+ [project]
2
+ name = "pySSTV"
3
+ version = "0.5.10"
4
+ readme = "README.md"
5
+ description='Python classes for generating Slow-scan Television transmissions'
6
+ requires-python = ">=3.11"
7
+ authors = [{name = "András Veres-Szentkirályi", email = "vsza@vsza.hu"}]
8
+ license = "MIT"
9
+ license-files = ["LICENSE.txt"]
10
+ keywords = ["HAM", "SSTV", "slow-scan", "television", "Scottie", "Martin", "Robot", "Pasokon"]
11
+ classifiers = [
12
+ "Development Status :: 4 - Beta",
13
+ "Topic :: Communications :: Ham Radio",
14
+ "Topic :: Multimedia :: Video :: Conversion",
15
+ "Operating System :: OS Independent",
16
+ ]
17
+ dependencies = [
18
+ "pillow==13.0.0",
19
+ ]
20
+
21
+ [project.urls]
22
+ Homepage = "https://github.com/dnet/pySSTV"
23
+
24
+ [project.scripts]
25
+ pysstv = "pysstv.__main__:main"
26
+
27
+ [build-system]
28
+ requires = ["setuptools>=77"]
29
+ build-backend = "setuptools.build_meta"
30
+
31
+ [dependency-groups]
32
+ dev = [
33
+ "pytest",
34
+ ]
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- from __future__ import print_function, division
4
3
  from PIL import Image
5
4
  from argparse import ArgumentParser
6
5
  from sys import stderr
@@ -77,8 +76,8 @@ def main():
77
76
  y = (image.height - mode.HEIGHT) / 2
78
77
  image = image.crop((x, y, mode.WIDTH + x, mode.HEIGHT + y))
79
78
  elif not all(i >= m for i, m in zip(image.size, (mode.WIDTH, mode.HEIGHT))):
80
- print(('Image must be at least {m.WIDTH} x {m.HEIGHT} pixels '
81
- 'for mode {m.__name__}').format(m=mode), file=stderr)
79
+ print(f'Image must be at least {mode.WIDTH} x {mode.HEIGHT} pixels '
80
+ f'for mode {mode.__name__}', file=stderr)
82
81
  raise SystemExit(1)
83
82
  s = mode(image, args.rate, args.bits)
84
83
  s.vox_enabled = args.vox
@@ -90,11 +89,7 @@ def main():
90
89
 
91
90
 
92
91
  def build_module_map():
93
- try:
94
- from collections import OrderedDict
95
- module_map = OrderedDict()
96
- except ImportError:
97
- module_map = {}
92
+ module_map = {}
98
93
  for module in SSTV_MODULES:
99
94
  for mode in module.MODES:
100
95
  module_map[mode.__name__] = mode
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env python
2
- from __future__ import division
3
2
  from pysstv.sstv import byte_to_freq, FREQ_BLACK, FREQ_WHITE, FREQ_VIS_START
4
3
  from pysstv.grayscale import GrayscaleSSTV
5
4
  from itertools import chain
@@ -74,7 +73,6 @@ class ScottieS1(MartinM1):
74
73
  class ScottieS2(ScottieS1):
75
74
  VIS_CODE = 0x38
76
75
  SCAN = 88.064 - ScottieS1.INTER_CH_GAP
77
- WIDTH = 160
78
76
 
79
77
 
80
78
  class ScottieDX(ScottieS1):
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- from __future__ import division
4
3
  from pysstv.sstv import SSTV, byte_to_freq
5
4
 
6
5
 
@@ -27,7 +26,7 @@ class Robot8BW(GrayscaleSSTV):
27
26
  WIDTH = 160
28
27
  HEIGHT = 120
29
28
  SYNC = 7
30
- SCAN = 60
29
+ SCAN = 59.90
31
30
 
32
31
 
33
32
  class Robot24BW(GrayscaleSSTV):
@@ -1,9 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- from __future__ import division, with_statement
4
3
  from math import sin, pi
5
4
  from random import random
6
- from contextlib import closing
7
5
  from itertools import cycle, chain
8
6
  from array import array
9
7
  import wave
@@ -24,7 +22,7 @@ MSEC_VIS_BIT = 30
24
22
  MSEC_FSKID_BIT = 22
25
23
 
26
24
 
27
- class SSTV(object):
25
+ class SSTV:
28
26
 
29
27
  def __init__(self, image, samples_per_sec, bits):
30
28
  self.image = image
@@ -47,7 +45,7 @@ class SSTV(object):
47
45
  if self.nchannels != 1:
48
46
  data = array(fmt, chain.from_iterable(
49
47
  zip(*([data] * self.nchannels))))
50
- with closing(wave.open(filename, 'wb')) as wav:
48
+ with wave.open(filename, 'wb') as wav:
51
49
  wav.setnchannels(self.nchannels)
52
50
  wav.setsampwidth(self.bits // 8)
53
51
  wav.setframerate(self.samples_per_sec)
@@ -103,13 +101,12 @@ class SSTV(object):
103
101
  yield FREQ_VIS_START, MSEC_VIS_START
104
102
  yield FREQ_SYNC, MSEC_VIS_BIT # start bit
105
103
  vis = self.VIS_CODE
106
- num_ones = 0
107
104
  for _ in range(7):
108
105
  bit = vis & 1
109
106
  vis >>= 1
110
- num_ones += bit
111
107
  bit_freq = FREQ_VIS_BIT1 if bit == 1 else FREQ_VIS_BIT0
112
108
  yield bit_freq, MSEC_VIS_BIT
109
+ num_ones = (self.VIS_CODE & 0x7f).bit_count()
113
110
  parity_freq = FREQ_VIS_BIT1 if num_ones % 2 == 1 else FREQ_VIS_BIT0
114
111
  yield parity_freq, MSEC_VIS_BIT
115
112
  yield FREQ_SYNC, MSEC_VIS_BIT # stop bit
@@ -125,8 +122,8 @@ class SSTV(object):
125
122
  return []
126
123
 
127
124
  def add_fskid_text(self, text):
128
- self.fskid_payload += '\x20\x2a{0}\x01'.format(
129
- ''.join(chr(ord(c) - 0x20) for c in text))
125
+ encoded = ''.join(chr(ord(c) - 0x20) for c in text)
126
+ self.fskid_payload += f'\x20\x2a{encoded}\x01'
130
127
 
131
128
  def horizontal_sync(self):
132
129
  yield FREQ_SYNC, self.SYNC
@@ -39,6 +39,6 @@ class TestMartinM1(unittest.TestCase):
39
39
  self.maxDiff = None
40
40
  line_numbers = [1, 10, 100]
41
41
  for line in line_numbers:
42
- expected = load_pickled_asset("MartinM1_encode_line_lena{0}".format(line))
42
+ expected = load_pickled_asset(f"MartinM1_encode_line_lena{line}")
43
43
  actual = list(self.lena.encode_line(line))
44
44
  self.assertEqual(expected, actual)
@@ -1,8 +1,8 @@
1
1
  import unittest
2
2
  from io import BytesIO
3
3
  from itertools import islice
4
- import mock
5
- from mock import MagicMock
4
+ from unittest import mock
5
+ from unittest.mock import MagicMock
6
6
  import hashlib
7
7
 
8
8
  from pysstv import sstv
@@ -1 +0,0 @@
1
- pillow==12.3.0
@@ -1,19 +0,0 @@
1
- [project]
2
- name = "pySSTV"
3
- version = "0.5.9"
4
- readme = "README.md"
5
- description='Python classes for generating Slow-scan Television transmissions'
6
- requires-python = ">=3.10"
7
- dependencies = [
8
- "pillow==12.3.0",
9
- ]
10
-
11
- [build-system]
12
- requires = ["setuptools"]
13
- build-backend = "setuptools.build_meta"
14
-
15
- [dependency-groups]
16
- dev = [
17
- "mock==1.0.1",
18
- "nose==1.3.0",
19
- ]
pysstv-0.5.9/setup.py DELETED
@@ -1,30 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- from setuptools import setup
4
-
5
- setup(
6
- name='PySSTV',
7
- version='0.5.9',
8
- description='Python classes for generating Slow-scan Television transmissions',
9
- author=u'András Veres-Szentkirályi',
10
- author_email='vsza@vsza.hu',
11
- url='https://github.com/dnet/pySSTV',
12
- packages=['pysstv', 'pysstv.tests', 'pysstv.examples'],
13
- entry_points={
14
- 'console_scripts': [
15
- 'pysstv = pysstv.__main__:main',
16
- ],
17
- },
18
- keywords='HAM SSTV slow-scan television Scottie Martin Robot Pasokon',
19
- install_requires = ['Pillow'],
20
- license='MIT',
21
- classifiers=[
22
- 'Development Status :: 4 - Beta',
23
- 'Topic :: Communications :: Ham Radio',
24
- 'Topic :: Multimedia :: Video :: Conversion',
25
- 'License :: OSI Approved :: MIT License',
26
- 'Operating System :: OS Independent',
27
- ],
28
- long_description=open('README.md').read(),
29
- long_description_content_type="text/markdown",
30
- )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes