geopic-tag-reader 1.4.2__tar.gz → 1.6.0__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 (69) hide show
  1. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/.gitlab-ci.yml +6 -6
  2. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/CHANGELOG.md +21 -1
  3. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/PKG-INFO +14 -13
  4. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/docs/tech/cli.md +1 -1
  5. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/__init__.py +1 -1
  6. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/camera.py +6 -5
  7. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/cameras.csv +4 -2
  8. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/reader.py +30 -12
  9. {geopic_tag_reader-1.4.2/geopic_tag_reader/translations/ja → geopic_tag_reader-1.6.0/geopic_tag_reader/translations/br}/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  10. geopic_tag_reader-1.4.2/geopic_tag_reader/translations/geopic_tag_reader.pot → geopic_tag_reader-1.6.0/geopic_tag_reader/translations/br/LC_MESSAGES/geopic_tag_reader.po +4 -5
  11. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/da/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  12. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/da/LC_MESSAGES/geopic_tag_reader.po +1 -1
  13. geopic_tag_reader-1.6.0/geopic_tag_reader/translations/de/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  14. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/de/LC_MESSAGES/geopic_tag_reader.po +3 -2
  15. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/en/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  16. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/en/LC_MESSAGES/geopic_tag_reader.po +22 -22
  17. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/eo/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  18. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/eo/LC_MESSAGES/geopic_tag_reader.po +1 -1
  19. geopic_tag_reader-1.6.0/geopic_tag_reader/translations/es/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  20. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/es/LC_MESSAGES/geopic_tag_reader.po +3 -2
  21. geopic_tag_reader-1.6.0/geopic_tag_reader/translations/fr/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  22. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/fr/LC_MESSAGES/geopic_tag_reader.po +3 -2
  23. geopic_tag_reader-1.4.2/geopic_tag_reader/translations/ja/LC_MESSAGES/geopic_tag_reader.po → geopic_tag_reader-1.6.0/geopic_tag_reader/translations/geopic_tag_reader.pot +26 -25
  24. geopic_tag_reader-1.6.0/geopic_tag_reader/translations/hu/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  25. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/hu/LC_MESSAGES/geopic_tag_reader.po +3 -2
  26. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/it/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  27. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/it/LC_MESSAGES/geopic_tag_reader.po +3 -3
  28. geopic_tag_reader-1.6.0/geopic_tag_reader/translations/ja/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  29. geopic_tag_reader-1.6.0/geopic_tag_reader/translations/ja/LC_MESSAGES/geopic_tag_reader.po +207 -0
  30. geopic_tag_reader-1.6.0/geopic_tag_reader/translations/nl/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  31. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/nl/LC_MESSAGES/geopic_tag_reader.po +18 -6
  32. geopic_tag_reader-1.6.0/geopic_tag_reader/translations/pl/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  33. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/pl/LC_MESSAGES/geopic_tag_reader.po +3 -2
  34. geopic_tag_reader-1.6.0/geopic_tag_reader/translations/sv/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  35. geopic_tag_reader-1.6.0/geopic_tag_reader/translations/sv/LC_MESSAGES/geopic_tag_reader.po +216 -0
  36. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/pyproject.toml +11 -11
  37. geopic_tag_reader-1.4.2/geopic_tag_reader/translations/de/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  38. geopic_tag_reader-1.4.2/geopic_tag_reader/translations/es/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  39. geopic_tag_reader-1.4.2/geopic_tag_reader/translations/fr/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  40. geopic_tag_reader-1.4.2/geopic_tag_reader/translations/hu/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  41. geopic_tag_reader-1.4.2/geopic_tag_reader/translations/nl/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  42. geopic_tag_reader-1.4.2/geopic_tag_reader/translations/pl/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  43. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/.gitignore +0 -0
  44. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/.pre-commit-config.yaml +0 -0
  45. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/CODE_OF_CONDUCT.md +0 -0
  46. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/LICENSE +0 -0
  47. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/Makefile +0 -0
  48. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/README.md +0 -0
  49. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/docs/develop.md +0 -0
  50. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/docs/images/quality_score.png +0 -0
  51. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/docs/images/quality_score_viewer.png +0 -0
  52. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/docs/index.md +0 -0
  53. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/docs/install.md +0 -0
  54. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/docs/quality_score.md +0 -0
  55. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/docs/tech/api_reference.md +0 -0
  56. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/i18n.py +0 -0
  57. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/main.py +0 -0
  58. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/model.py +0 -0
  59. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/py.typed +0 -0
  60. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/sequence.py +0 -0
  61. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/fi/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  62. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/fi/LC_MESSAGES/geopic_tag_reader.po +0 -0
  63. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/ko/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  64. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/ko/LC_MESSAGES/geopic_tag_reader.po +0 -0
  65. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/zh_Hant/LC_MESSAGES/geopic_tag_reader.mo +0 -0
  66. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/translations/zh_Hant/LC_MESSAGES/geopic_tag_reader.po +0 -0
  67. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/geopic_tag_reader/writer.py +0 -0
  68. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/mkdocs.yml +0 -0
  69. {geopic_tag_reader-1.4.2 → geopic_tag_reader-1.6.0}/pytest.ini +0 -0
@@ -9,21 +9,21 @@ before_script:
9
9
  - python --version # For debugging
10
10
 
11
11
  test mypy:
12
- image: python:3.8
12
+ image: python:3.9
13
13
  script:
14
14
  - apt update && apt install gcc
15
15
  - pip install .[dev]
16
16
  - mypy --install-types --non-interactive geopic_tag_reader/
17
17
 
18
18
  lint:
19
- image: python:3.8
19
+ image: python:3.9
20
20
  script:
21
21
  - apt update && apt install gcc
22
22
  - pip install .[dev]
23
23
  - black --fast --check .
24
24
 
25
25
  tests-reader:
26
- image: python:3.8
26
+ image: python:3.9
27
27
  script:
28
28
  - apt update && apt install gcc gettext
29
29
  - pip install .[dev]
@@ -31,7 +31,7 @@ tests-reader:
31
31
  - pytest -s -vv --ignore=tests/test_writer.py --ignore=geopic_tag_reader/writer.py
32
32
 
33
33
  tests-writer:
34
- image: python:3.8
34
+ image: python:3.9
35
35
  script:
36
36
  - apt update && apt install gcc gettext
37
37
  - pip install .[dev,write-exif]
@@ -40,7 +40,7 @@ tests-writer:
40
40
 
41
41
  # tests-deploy_pypi:
42
42
  # stage: deploy
43
- # image: python:3.8
43
+ # image: python:3.9
44
44
  # variables:
45
45
  # FLIT_INDEX_URL: https://test.pypi.org/legacy/
46
46
  # FLIT_USERNAME: $TEST_FLIT_USERNAME
@@ -55,7 +55,7 @@ tests-writer:
55
55
 
56
56
  deploy_pypi:
57
57
  stage: deploy
58
- image: python:3.8
58
+ image: python:3.9
59
59
  script:
60
60
  - apt update && apt install -y gcc git gettext
61
61
  - pip install .[build]
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.6.0] - 2025-05-09
11
+
12
+ ### Added
13
+
14
+ - Add a new method `getPictureMetadata` to extract metadata from already read metadata. This will be useful to parse again the metadata from a picture without rereading the file after updates of the metadata parsing.
15
+
16
+ ### Changed
17
+
18
+ - Change signature of `camera.is_360` to specify `width` and `height` parameters as integers.
19
+ - Default GPS precision for Qoocam cameras is set to 4 meters.
20
+
21
+ ## [1.5.0] - 2025-04-14
22
+
23
+ ### Changed
24
+
25
+ - Update all required libraries (especially [timezonefinder](https://github.com/jannikmi/timezonefinder/) and its [h3-py](https://github.com/uber/h3-py) dependency) to avoid an installation issue on Windows.
26
+ - Minimal required version is now python 3.9 (it was needed by a dependency, and python 3.8 has reached end of life on october 2024).
27
+
10
28
  ## [1.4.2] - 2025-02-10
11
29
 
12
30
  ### Fixed
@@ -267,7 +285,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
267
285
 
268
286
  - EXIF tag reading methods extracted from [Panoramax/GeoVisio API](https://gitlab.com/panoramax/server/api)
269
287
 
270
- [Unreleased]: https://gitlab.com/panoramax/server/geo-picture-tag-reader/-/compare/1.4.2...main
288
+ [Unreleased]: https://gitlab.com/panoramax/server/geo-picture-tag-reader/-/compare/1.6.0...main
289
+ [1.6.0]: https://gitlab.com/panoramax/server/geo-picture-tag-reader/-/compare/1.5.0...1.6.0
290
+ [1.5.0]: https://gitlab.com/panoramax/server/geo-picture-tag-reader/-/compare/1.4.2...1.5.0
271
291
  [1.4.2]: https://gitlab.com/panoramax/server/geo-picture-tag-reader/-/compare/1.4.1...1.4.2
272
292
  [1.4.1]: https://gitlab.com/panoramax/server/geo-picture-tag-reader/-/compare/1.4.0...1.4.1
273
293
  [1.4.0]: https://gitlab.com/panoramax/server/geo-picture-tag-reader/-/compare/1.3.3...1.4.0
@@ -1,27 +1,28 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: geopic-tag-reader
3
- Version: 1.4.2
3
+ Version: 1.6.0
4
4
  Summary: GeoPicTagReader
5
5
  Author-email: Adrien PAVIE <panieravide@riseup.net>
6
- Requires-Python: >=3.8
6
+ Requires-Python: >=3.9
7
7
  Description-Content-Type: text/markdown
8
8
  Classifier: License :: OSI Approved :: MIT License
9
- Requires-Dist: typer ~= 0.12
9
+ License-File: LICENSE
10
+ Requires-Dist: typer ~= 0.15
10
11
  Requires-Dist: xmltodict ~= 0.14
11
12
  Requires-Dist: pyexiv2 == 2.15.3
12
- Requires-Dist: timezonefinder == 6.5.3
13
- Requires-Dist: pytz ~= 2024.2
14
- Requires-Dist: types-pytz ~= 2023.3.0.1
13
+ Requires-Dist: timezonefinder == 6.5.9
14
+ Requires-Dist: pytz ~= 2025.2
15
+ Requires-Dist: types-pytz ~= 2025.2.0
15
16
  Requires-Dist: types-python-dateutil ~= 2.9.0
16
17
  Requires-Dist: flit ~= 3.8.0 ; extra == "build"
17
- Requires-Dist: black ~= 24.3 ; extra == "dev"
18
- Requires-Dist: mypy ~= 1.12 ; extra == "dev"
19
- Requires-Dist: pytest ~= 7.2.0 ; extra == "dev"
18
+ Requires-Dist: black ~= 25.1.0 ; extra == "dev"
19
+ Requires-Dist: mypy ~= 1.15.0 ; extra == "dev"
20
+ Requires-Dist: pytest ~= 8.3.5 ; extra == "dev"
20
21
  Requires-Dist: pytest-datafiles ~= 3.0 ; extra == "dev"
21
22
  Requires-Dist: types-xmltodict ~= 0.14 ; extra == "dev"
22
- Requires-Dist: pre-commit ~= 3.3.3 ; extra == "dev"
23
- Requires-Dist: mkdocs-material ~= 9.5.21 ; extra == "docs"
24
- Requires-Dist: mkdocstrings[python] ~= 0.25.1 ; extra == "docs"
23
+ Requires-Dist: pre-commit ~= 4.2 ; extra == "dev"
24
+ Requires-Dist: mkdocs-material ~= 9.6.11 ; extra == "docs"
25
+ Requires-Dist: mkdocstrings[python] ~= 0.29.1 ; extra == "docs"
25
26
  Requires-Dist: python-dateutil ~= 2.9.0 ; extra == "write-exif"
26
27
  Requires-Dist: types-python-dateutil ~= 2.9.0.20241003 ; extra == "write-exif"
27
28
  Project-URL: Home, https://gitlab.com/panoramax/server/geo-picture-tag-reader
@@ -50,7 +50,7 @@ $ geopic-tag-reader write [OPTIONS]
50
50
 
51
51
  * `--input PATH`: Path to your JPEG image file [required]
52
52
  * `--output PATH`: Output path where to write the updated image file. If not present, the input file will be overriten.
53
- * `--capture-time TEXT`: override capture time of the image, formated in isoformat, like '2023-06-01T12:48:01Z'. Note that if no timezone offset is defined, the datetime will be taken as local time and localized using the picture position if available.
53
+ * `--capture-time TEXT`: override capture time of the image, formated in isoformat, like &#x27;2023-06-01T12:48:01Z&#x27;. Note that if no timezone offset is defined, the datetime will be taken as local time and localized using the picture position if available.
54
54
  * `--longitude FLOAT`: override longitude of the image, in decimal degrees (WGS84 / EPSG:4326) (like `2.3522219` for Paris)
55
55
  * `--latitude FLOAT`: override latitude of the image, in decimal degrees (WGS84 / EPSG:4326) (like `48.856614` for Paris)
56
56
  * `--picture-type [flat|equirectangular]`: type of picture, `equirectangular` for 360° pictures, `flat` otherwise
@@ -2,4 +2,4 @@
2
2
  GeoPicTagReader
3
3
  """
4
4
 
5
- __version__ = "1.4.2"
5
+ __version__ = "1.6.0"
@@ -19,6 +19,7 @@ GPS_ACCURACY_MAKE = {
19
19
  "blackvue": 4,
20
20
  "tectectec": 4,
21
21
  "arashi vision": 4,
22
+ "qoocam": 4,
22
23
  # Smartphone GPS
23
24
  "samsung": 5,
24
25
  "xiaomi": 5,
@@ -118,7 +119,7 @@ def find_camera(make: Optional[str] = None, model: Optional[str] = None) -> Opti
118
119
  return next((cameras[matchMake][matchModel] for matchModel in cameras[matchMake].keys() if model.lower().startswith(matchModel)), None)
119
120
 
120
121
 
121
- def is_360(make: Optional[str] = None, model: Optional[str] = None, width: Optional[str] = None, height: Optional[str] = None) -> bool:
122
+ def is_360(make: Optional[str] = None, model: Optional[str] = None, width: Optional[int] = None, height: Optional[int] = None) -> bool:
122
123
  """
123
124
  Checks if given camera is equirectangular (360°) based on its make, model and dimensions (width, height).
124
125
 
@@ -128,11 +129,11 @@ def is_360(make: Optional[str] = None, model: Optional[str] = None, width: Optio
128
129
  False
129
130
  >>> is_360("GoPro", "Max 360")
130
131
  True
131
- >>> is_360("GoPro", "Max 360", "2048", "1024")
132
+ >>> is_360("GoPro", "Max 360", 2048, 1024)
132
133
  True
133
- >>> is_360("GoPro", "Max 360", "1024", "768")
134
+ >>> is_360("GoPro", "Max 360", 1024, 768)
134
135
  False
135
- >>> is_360("RICOH", "THETA S", "5376", "2688")
136
+ >>> is_360("RICOH", "THETA S", 5376, 2688)
136
137
  True
137
138
  """
138
139
 
@@ -142,7 +143,7 @@ def is_360(make: Optional[str] = None, model: Optional[str] = None, width: Optio
142
143
  return False
143
144
 
144
145
  # Check width and height are equirectangular
145
- if not ((width is None or height is None) or int(width) == 2 * int(height)):
146
+ if not ((width is None or height is None) or width == 2 * height):
146
147
  return False
147
148
 
148
149
  return camera.is_360
@@ -1167,6 +1167,8 @@
1167
1167
  "Gopro";"HD3";"5.76";;
1168
1168
  "GoPro";"HERO10 Black";"6.17";;
1169
1169
  "GoPro";"HERO11 Black";"6.74";;
1170
+ "GoPro";"HERO12 Black";"6.74";;
1171
+ "GoPro";"HERO13 Black";"6.74";;
1170
1172
  "GoPro";"HERO4 Black";"6.17";;
1171
1173
  "GoPro";"HERO4 Silver";"6.17";;
1172
1174
  "GoPro";"HERO5 Black";"6.17";;
@@ -1309,8 +1311,8 @@
1309
1311
  "Jenoptik";"JD C 5.0 SL";"7.11";;
1310
1312
  "JVC";"GC-QX3HD";"7.11";;
1311
1313
  "JVC";"GC-QX5HD";"7.11";;
1312
- "Kandao";"Qoocam 3";;"1";
1313
- "Kandao";"Qoocam 3 Ultra";;"1";
1314
+ "Kandao";"Qoocam 3";;"1";"4"
1315
+ "Kandao";"Qoocam 3 Ultra";;"1";"4"
1314
1316
  "Kodak";"DC200";"7.27";;
1315
1317
  "Kodak";"DC200 plus";"7.27";;
1316
1318
  "Kodak";"DC210 plus";"7.27";;
@@ -179,20 +179,17 @@ def readPictureMetadata(picture: bytes, lang_code: str = "en") -> GeoPicTags:
179
179
  GeoPicTags: Extracted metadata from picture
180
180
  """
181
181
 
182
- _ = i18n_init(lang_code)
183
- warnings = []
184
- img = pyexiv2.ImageData(picture)
185
182
  data = {}
186
- data.update(img.read_exif())
187
- data.update(img.read_iptc())
188
- data.update(img.read_xmp())
189
- width = img.get_pixel_width()
190
- height = img.get_pixel_height()
183
+ with pyexiv2.ImageData(picture) as img:
184
+ data.update(img.read_exif())
185
+ data.update(img.read_iptc())
186
+ data.update(img.read_xmp())
187
+ width = img.get_pixel_width()
188
+ height = img.get_pixel_height()
191
189
 
192
- imgComment = img.read_comment()
193
- if imgComment is not None and len(imgComment.strip()) > 0:
194
- data["Exif.Photo.UserComment"] = imgComment
195
- img.close()
190
+ imgComment = img.read_comment()
191
+ if imgComment is not None and len(imgComment.strip()) > 0:
192
+ data["Exif.Photo.UserComment"] = imgComment
196
193
 
197
194
  # Read Mapillary tags
198
195
  if "Exif.Image.ImageDescription" in data:
@@ -204,6 +201,27 @@ def readPictureMetadata(picture: bytes, lang_code: str = "en") -> GeoPicTags:
204
201
  except:
205
202
  pass
206
203
 
204
+ return getPictureMetadata(data, width, height, lang_code)
205
+
206
+
207
+ def getPictureMetadata(data: dict, width: int, height: int, lang_code: str = "en") -> GeoPicTags:
208
+ """Extracts metadata from already read metadata.
209
+
210
+ This method is useful when you already have the metadata read by `readPictureMetadata` and you want to extract the metadata from it.
211
+
212
+ Args:
213
+ data (dict): Raw EXIF tags / iptc / xmp / description from picture. MUST be comming from a previsou parse by the `readPictureMetadata` method.
214
+ width (int): Picture width
215
+ height (int): Picture height
216
+ lang_code (str): Language code for translating error labels
217
+
218
+ Returns:
219
+ GeoPicTags: Extracted metadata from picture
220
+ """
221
+
222
+ _ = i18n_init(lang_code)
223
+ warnings = []
224
+
207
225
  # Sanitize charset information
208
226
  for k, v in data.items():
209
227
  if isinstance(v, str):
@@ -3,18 +3,17 @@
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
  #
6
- #, fuzzy
7
6
  msgid ""
8
7
  msgstr ""
9
8
  "Project-Id-Version: PACKAGE VERSION\n"
10
9
  "Report-Msgid-Bugs-To: \n"
11
10
  "POT-Creation-Date: 2025-02-10 11:04+0100\n"
12
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
- "Language: \n"
12
+ "Last-Translator: Automatically generated\n"
13
+ "Language-Team: none\n"
14
+ "Language: br\n"
16
15
  "MIME-Version: 1.0\n"
17
- "Content-Type: text/plain; charset=CHARSET\n"
16
+ "Content-Type: text/plain; charset=UTF-8\n"
18
17
  "Content-Transfer-Encoding: 8bit\n"
19
18
 
20
19
  #: geopic_tag_reader/main.py:26
@@ -8,7 +8,7 @@ msgstr ""
8
8
  "Project-Id-Version: PACKAGE VERSION\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "POT-Creation-Date: 2024-11-24 15:36+0100\n"
11
- "PO-Revision-Date: 2025-01-07 15:14+0000\n"
11
+ "PO-Revision-Date: 2025-04-16 08:21+0000\n"
12
12
  "Last-Translator: ERYpTION <eryption.ar9q2@slmail.me>\n"
13
13
  "Language-Team: Danish <http://weblate.panoramax.xyz/projects/panoramax/"
14
14
  "tag-reader/da/>\n"
@@ -8,8 +8,8 @@ msgstr ""
8
8
  "Project-Id-Version: PACKAGE VERSION\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "POT-Creation-Date: 2024-07-10 13:05+0200\n"
11
- "PO-Revision-Date: 2025-01-09 08:14+0000\n"
12
- "Last-Translator: mcliquid <weblate@mcliquid.de>\n"
11
+ "PO-Revision-Date: 2025-04-15 07:48+0000\n"
12
+ "Last-Translator: Anonymous <noreply@weblate.org>\n"
13
13
  "Language-Team: German <http://weblate.panoramax.xyz/projects/panoramax/"
14
14
  "tag-reader/de/>\n"
15
15
  "Language: de\n"
@@ -40,6 +40,7 @@ msgid "Type:"
40
40
  msgstr "Typ:"
41
41
 
42
42
  #: geopic_tag_reader/main.py:31
43
+ #, fuzzy
43
44
  msgid "Make:"
44
45
  msgstr "Hersteller:"
45
46
 
@@ -7,8 +7,8 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: PACKAGE VERSION\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2025-02-10 11:04+0100\n"
11
- "PO-Revision-Date: 2025-02-10 11:04+0100\n"
10
+ "POT-Creation-Date: 2025-05-09 12:12+0200\n"
11
+ "PO-Revision-Date: 2025-05-09 12:12+0200\n"
12
12
  "Last-Translator: Automatically generated\n"
13
13
  "Language-Team: none\n"
14
14
  "Language: en\n"
@@ -94,24 +94,24 @@ msgstr "Yaw:"
94
94
  msgid "Warnings raised by reader:"
95
95
  msgstr "Warnings raised by reader:"
96
96
 
97
- #: geopic_tag_reader/reader.py:228
97
+ #: geopic_tag_reader/reader.py:246
98
98
  msgid "Read latitude is out of WGS84 bounds (should be in [-90, 90])"
99
99
  msgstr "Read latitude is out of WGS84 bounds (should be in [-90, 90])"
100
100
 
101
- #: geopic_tag_reader/reader.py:230
101
+ #: geopic_tag_reader/reader.py:248
102
102
  msgid "Read longitude is out of WGS84 bounds (should be in [-180, 180])"
103
103
  msgstr "Read longitude is out of WGS84 bounds (should be in [-180, 180])"
104
104
 
105
- #: geopic_tag_reader/reader.py:258
105
+ #: geopic_tag_reader/reader.py:276
106
106
  #, python-brace-format
107
107
  msgid "Skipping Mapillary date/time as it was not recognized: {v}"
108
108
  msgstr "Skipping Mapillary date/time as it was not recognized: {v}"
109
109
 
110
- #: geopic_tag_reader/reader.py:288
110
+ #: geopic_tag_reader/reader.py:306
111
111
  msgid "No heading value was found, this reduces usability of picture"
112
112
  msgstr "No heading value was found, this reduces usability of picture"
113
113
 
114
- #: geopic_tag_reader/reader.py:331
114
+ #: geopic_tag_reader/reader.py:349
115
115
  msgid ""
116
116
  "No make and model value found, no assumption on focal length or GPS "
117
117
  "precision can be made"
@@ -119,17 +119,17 @@ msgstr ""
119
119
  "No make and model value found, no assumption on focal length or GPS "
120
120
  "precision can be made"
121
121
 
122
- #: geopic_tag_reader/reader.py:381
122
+ #: geopic_tag_reader/reader.py:399
123
123
  msgid ""
124
124
  "No focal length value was found, this prevents calculating field of view"
125
125
  msgstr ""
126
126
  "No focal length value was found, this prevents calculating field of view"
127
127
 
128
- #: geopic_tag_reader/reader.py:433
128
+ #: geopic_tag_reader/reader.py:451
129
129
  msgid "No GPS accuracy value found, this prevents computing a quality score"
130
130
  msgstr "No GPS accuracy value found, this prevents computing a quality score"
131
131
 
132
- #: geopic_tag_reader/reader.py:435
132
+ #: geopic_tag_reader/reader.py:453
133
133
  msgid ""
134
134
  "No GPS horizontal positioning error value found, GPS accuracy can only be "
135
135
  "estimated"
@@ -137,35 +137,35 @@ msgstr ""
137
137
  "No GPS horizontal positioning error value found, GPS accuracy can only be "
138
138
  "estimated"
139
139
 
140
- #: geopic_tag_reader/reader.py:442
140
+ #: geopic_tag_reader/reader.py:460
141
141
  msgid "No GPS coordinates or broken coordinates in picture EXIF tags"
142
142
  msgstr "No GPS coordinates or broken coordinates in picture EXIF tags"
143
143
 
144
- #: geopic_tag_reader/reader.py:448
144
+ #: geopic_tag_reader/reader.py:466
145
145
  msgid "No valid date in picture EXIF tags"
146
146
  msgstr "No valid date in picture EXIF tags"
147
147
 
148
- #: geopic_tag_reader/reader.py:453
148
+ #: geopic_tag_reader/reader.py:471
149
149
  msgid "The picture is missing mandatory metadata:"
150
150
  msgstr "The picture is missing mandatory metadata:"
151
151
 
152
- #: geopic_tag_reader/reader.py:567 geopic_tag_reader/reader.py:596
152
+ #: geopic_tag_reader/reader.py:585 geopic_tag_reader/reader.py:614
153
153
  msgid "GPSLatitudeRef not found, assuming GPSLatitudeRef is North"
154
154
  msgstr "GPSLatitudeRef not found, assuming GPSLatitudeRef is North"
155
155
 
156
- #: geopic_tag_reader/reader.py:575
156
+ #: geopic_tag_reader/reader.py:593
157
157
  msgid "Broken GPS coordinates in picture EXIF tags"
158
158
  msgstr "Broken GPS coordinates in picture EXIF tags"
159
159
 
160
- #: geopic_tag_reader/reader.py:578 geopic_tag_reader/reader.py:602
160
+ #: geopic_tag_reader/reader.py:596 geopic_tag_reader/reader.py:620
161
161
  msgid "GPSLongitudeRef not found, assuming GPSLongitudeRef is East"
162
162
  msgstr "GPSLongitudeRef not found, assuming GPSLongitudeRef is East"
163
163
 
164
- #: geopic_tag_reader/reader.py:663
164
+ #: geopic_tag_reader/reader.py:681
165
165
  msgid "Precise timezone information not found, fallback to UTC"
166
166
  msgstr "Precise timezone information not found, fallback to UTC"
167
167
 
168
- #: geopic_tag_reader/reader.py:668
168
+ #: geopic_tag_reader/reader.py:686
169
169
  msgid ""
170
170
  "Precise timezone information not found (and no GPS coordinates to help), "
171
171
  "fallback to UTC"
@@ -173,14 +173,14 @@ msgstr ""
173
173
  "Precise timezone information not found (and no GPS coordinates to help), "
174
174
  "fallback to UTC"
175
175
 
176
- #: geopic_tag_reader/reader.py:672
176
+ #: geopic_tag_reader/reader.py:690
177
177
  #, python-brace-format
178
178
  msgid ""
179
179
  "Skipping original date/time (from {datefield}) as it was not recognized: {v}"
180
180
  msgstr ""
181
181
  "Skipping original date/time (from {datefield}) as it was not recognized: {v}"
182
182
 
183
- #: geopic_tag_reader/reader.py:704
183
+ #: geopic_tag_reader/reader.py:722
184
184
  #, python-brace-format
185
185
  msgid ""
186
186
  "GPSTimeStamp and GPSDateTime don't contain supported time format (in {group} "
@@ -189,12 +189,12 @@ msgstr ""
189
189
  "GPSTimeStamp and GPSDateTime don't contain supported time format (in {group} "
190
190
  "group)"
191
191
 
192
- #: geopic_tag_reader/reader.py:735
192
+ #: geopic_tag_reader/reader.py:753
193
193
  #, python-brace-format
194
194
  msgid "Skipping GPS date/time ({group} group) as it was not recognized: {v}"
195
195
  msgstr "Skipping GPS date/time ({group} group) as it was not recognized: {v}"
196
196
 
197
- #: geopic_tag_reader/reader.py:761
197
+ #: geopic_tag_reader/reader.py:779
198
198
  #, python-brace-format
199
199
  msgid ""
200
200
  "Microseconds read from decimal seconds value ({microsecondsFromSeconds}) is "
@@ -8,7 +8,7 @@ msgstr ""
8
8
  "Project-Id-Version: PACKAGE VERSION\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "POT-Creation-Date: 2024-11-24 15:36+0100\n"
11
- "PO-Revision-Date: 2025-01-17 15:11+0000\n"
11
+ "PO-Revision-Date: 2025-04-26 18:21+0000\n"
12
12
  "Last-Translator: Rémi Simonnin <remisimonnin@orange.fr>\n"
13
13
  "Language-Team: Esperanto <http://weblate.panoramax.xyz/projects/panoramax/"
14
14
  "tag-reader/eo/>\n"
@@ -8,8 +8,8 @@ msgstr ""
8
8
  "Project-Id-Version: PACKAGE VERSION\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "POT-Creation-Date: 2024-07-10 13:05+0200\n"
11
- "PO-Revision-Date: 2024-10-02 08:07+0000\n"
12
- "Last-Translator: DaniCS <daniel.callejas.sevilla@gmail.com>\n"
11
+ "PO-Revision-Date: 2025-02-27 12:33+0000\n"
12
+ "Last-Translator: PanierAvide <adrien@pavie.info>\n"
13
13
  "Language-Team: Spanish <http://weblate.panoramax.xyz/projects/panoramax/"
14
14
  "tag-reader/es/>\n"
15
15
  "Language: es\n"
@@ -40,6 +40,7 @@ msgid "Type:"
40
40
  msgstr "Tipo:"
41
41
 
42
42
  #: geopic_tag_reader/main.py:31
43
+ #, fuzzy
43
44
  msgid "Make:"
44
45
  msgstr "Marca:"
45
46
 
@@ -8,8 +8,8 @@ msgstr ""
8
8
  "Project-Id-Version: \n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "POT-Creation-Date: 2024-10-28 11:05+0100\n"
11
- "PO-Revision-Date: 2025-01-10 14:14+0000\n"
12
- "Last-Translator: PanierAvide <adrien@pavie.info>\n"
11
+ "PO-Revision-Date: 2025-04-15 07:48+0000\n"
12
+ "Last-Translator: Anonymous <noreply@weblate.org>\n"
13
13
  "Language-Team: French <http://weblate.panoramax.xyz/projects/panoramax/"
14
14
  "tag-reader/fr/>\n"
15
15
  "Language: fr\n"
@@ -52,6 +52,7 @@ msgid "Type:"
52
52
  msgstr "Type :"
53
53
 
54
54
  #: geopic_tag_reader/main.py:34
55
+ #, fuzzy
55
56
  msgid "Make:"
56
57
  msgstr "Fabriquant :"
57
58