valetudo-map-parser 0.1.3__tar.gz → 0.1.5__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 (18) hide show
  1. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/PKG-INFO +2 -2
  2. valetudo_map_parser-0.1.5/SCR/valetudo_map_parser/__init__.py +31 -0
  3. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/config/auto_crop.py +12 -12
  4. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/hypfer_handler.py +5 -5
  5. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/pyproject.toml +3 -3
  6. valetudo_map_parser-0.1.3/SCR/valetudo_map_parser/__init__.py +0 -2
  7. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/LICENSE +0 -0
  8. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/NOTICE.txt +0 -0
  9. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/README.md +0 -0
  10. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/config/__init__.py +0 -0
  11. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/config/colors.py +0 -0
  12. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/config/drawable.py +0 -0
  13. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/config/shared.py +0 -0
  14. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/config/types.py +0 -0
  15. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/hypfer_draw.py +0 -0
  16. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/images_utils.py +0 -0
  17. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/map_data.py +0 -0
  18. {valetudo_map_parser-0.1.3 → valetudo_map_parser-0.1.5}/SCR/valetudo_map_parser/py.typed +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: valetudo-map-parser
3
- Version: 0.1.3
4
- Summary: A Python library to parse Valetudo map data returning a PIL Image object
3
+ Version: 0.1.5
4
+ Summary: A Python library to parse Valetudo map data returning a PIL Image object.
5
5
  License: Apache-2.0
6
6
  Author: Sandro Cantarella
7
7
  Author-email: gsca075@gmail.com
@@ -0,0 +1,31 @@
1
+ """Valetudo map parser.
2
+ Version: 0.1.4"""
3
+
4
+ from .hypfer_handler import HypferMapImageHandler
5
+ from .config.shared import CameraShared, CameraSharedManager
6
+ from .config.colors import ColorsManagment
7
+ from .config.drawable import Drawable
8
+ from .config.types import (
9
+ SnapshotStore,
10
+ UserLanguageStore,
11
+ RoomStore,
12
+ RoomsProperties,
13
+ TrimCropData,
14
+ CameraModes,
15
+ )
16
+
17
+ __all__ = [
18
+ "HypferMapImageHandler",
19
+ "CameraShared",
20
+ "CameraSharedManager",
21
+ "ColorsManagment",
22
+ "Drawable",
23
+ "SnapshotStore",
24
+ "UserLanguageStore",
25
+ "UserLanguageStore",
26
+ "SnapshotStore",
27
+ "RoomStore",
28
+ "RoomsProperties",
29
+ "TrimCropData",
30
+ "CameraModes",
31
+ ]
@@ -71,18 +71,18 @@ class AutoCrop:
71
71
  return trimmed_width, trimmed_height
72
72
 
73
73
  async def _async_auto_crop_data(self, tdata=None):
74
- """Load the auto crop data from the disk."""
75
-
76
- if not self.imh.auto_crop:
77
- trims_data = TrimCropData.from_dict(dict(tdata)).to_list()
78
- (
79
- self.imh.trim_left,
80
- self.imh.trim_up,
81
- self.imh.trim_right,
82
- self.imh.trim_down,
83
- ) = trims_data
84
- self._calculate_trimmed_dimensions()
85
- return trims_data
74
+ """Load the auto crop data from the Camera config."""
75
+ # todo: implement this method but from config data
76
+ # if not self.imh.auto_crop:
77
+ # trims_data = TrimCropData.from_dict(dict(tdata)).to_list()
78
+ # (
79
+ # self.imh.trim_left,
80
+ # self.imh.trim_up,
81
+ # self.imh.trim_right,
82
+ # self.imh.trim_down,
83
+ # ) = trims_data
84
+ # self._calculate_trimmed_dimensions()
85
+ # return trims_data
86
86
  return None
87
87
 
88
88
  def auto_crop_offset(self):
@@ -21,7 +21,7 @@ from .config.types import (
21
21
  )
22
22
  from .config.auto_crop import AutoCrop
23
23
  from .config.drawable import Drawable
24
- from SCR.valetudo_map_parser.config.shared import CameraShared
24
+ from .config.shared import CameraShared
25
25
  from .map_data import ImageData
26
26
  from .images_utils import (
27
27
  ImageUtils as ImUtils,
@@ -66,10 +66,10 @@ class HypferMapImageHandler:
66
66
  self.max_frames = 1024
67
67
  self.zooming = False # zooming the image.
68
68
  self.svg_wait = False # SVG image creation wait.
69
- self.trim_down = None # memory stored trims calculated once.
70
- self.trim_left = None # memory stored trims calculated once.
71
- self.trim_right = None # memory stored trims calculated once.
72
- self.trim_up = None # memory stored trims calculated once.
69
+ self.trim_down = 0 # memory stored trims calculated once.
70
+ self.trim_left = 0 # memory stored trims calculated once.
71
+ self.trim_right = 0 # memory stored trims calculated once.
72
+ self.trim_up = 0 # memory stored trims calculated once.
73
73
  self.offset_top = self.shared.offset_top # offset top
74
74
  self.offset_bottom = self.shared.offset_down # offset bottom
75
75
  self.offset_left = self.shared.offset_left # offset left
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
  name = "valetudo-map-parser"
3
- version = "0.1.3"
4
- description = "A Python library to parse Valetudo map data returning a PIL Image object"
3
+ version = "0.1.5"
4
+ description = "A Python library to parse Valetudo map data returning a PIL Image object."
5
5
  authors = ["Sandro Cantarella <gsca075@gmail.com>"]
6
6
  license = "Apache-2.0"
7
7
  readme = "README.md"
@@ -19,7 +19,7 @@ python = ">=3.12"
19
19
  numpy = ">=1.26.4"
20
20
  Pillow = ">=10.3.0"
21
21
 
22
- [tool.poetry.dev-dependencies]
22
+ [poetry.group.dev.dependencies]
23
23
  black = "*"
24
24
  mypy = "*"
25
25
  ruff = "*"
@@ -1,2 +0,0 @@
1
- """Valetudo map parser.
2
- Version: 0.1.0"""