mapillary-tools 0.10.3a0__py3-none-any.whl → 0.10.3a1__py3-none-any.whl

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.
@@ -1 +1 @@
1
- VERSION = "0.10.3a"
1
+ VERSION = "0.10.3a1"
mapillary_tools/utils.py CHANGED
@@ -32,15 +32,20 @@ def is_video_file(path: Path) -> bool:
32
32
  ".mkv",
33
33
  # GoPro Max video filename extension
34
34
  ".360",
35
+ # Insta360 X3
36
+ ".insv",
35
37
  )
36
38
 
37
39
 
38
- def iterate_files(root: Path, recursive: bool = False) -> T.Generator[Path, None, None]:
40
+ def iterate_files(
41
+ root: Path, recursive: bool = False, follow_hidden_dirs: bool = False
42
+ ) -> T.Generator[Path, None, None]:
39
43
  for dirpath, dirnames, files in os.walk(root, topdown=True):
40
44
  if not recursive:
41
45
  dirnames.clear()
42
46
  else:
43
- dirnames[:] = [name for name in dirnames if not name.startswith(".")]
47
+ if not follow_hidden_dirs:
48
+ dirnames[:] = [name for name in dirnames if not name.startswith(".")]
44
49
  for file in files:
45
50
  if file.startswith("."):
46
51
  continue
@@ -146,23 +151,18 @@ def find_zipfiles(
146
151
  return list(deduplicate_paths(zip_paths))
147
152
 
148
153
 
149
- def find_xml_files(
150
- import_paths: T.Sequence[Path],
151
- skip_subfolders: bool = False,
152
- check_file_suffix: bool = False,
153
- ) -> T.List[Path]:
154
+ def find_xml_files(import_paths: T.Sequence[Path]) -> T.List[Path]:
154
155
  xml_paths: T.List[Path] = []
155
156
  for path in import_paths:
156
157
  if path.is_dir():
158
+ # XML could be hidden in hidden folders
159
+ # for example: exiftool -progress -w! /tmp/exiftool_outputs/%d%f.xml -r -n -ee -api LargeFileSupport=1 -X /path/to/.hidden_dirs/images/example.jpg
160
+ # The XML output will be /tmp/exiftool_outputs/path/to/.hidden_dirs/images/example.jpg
157
161
  xml_paths.extend(
158
162
  file
159
- for file in iterate_files(path, not skip_subfolders)
163
+ for file in iterate_files(path, recursive=True, follow_hidden_dirs=True)
160
164
  if file.suffix.lower() in [".xml"]
161
165
  )
162
166
  else:
163
- if check_file_suffix:
164
- if path.suffix.lower() in [".xml"]:
165
- xml_paths.append(path)
166
- else:
167
- xml_paths.append(path)
167
+ xml_paths.append(path)
168
168
  return list(deduplicate_paths(xml_paths))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mapillary-tools
3
- Version: 0.10.3a0
3
+ Version: 0.10.3a1
4
4
  Summary: Mapillary Image/Video Import Pipeline
5
5
  Home-page: https://github.com/mapillary/mapillary_tools
6
6
  Author: Mapillary
@@ -1,4 +1,4 @@
1
- mapillary_tools/__init__.py,sha256=NkDEOA__rIAB0h6Xp9bj06Xm17qMW0jwkaiwWJuy-0g,20
1
+ mapillary_tools/__init__.py,sha256=g13zy4GkILOgdt-2TQ5JY3DpX4O9OwdWluKqitZwBH8,21
2
2
  mapillary_tools/api_v4.py,sha256=57HdU3qQsCRD_2Gle74VhuQQiUf-D4_VSeje4722HgY,1865
3
3
  mapillary_tools/authenticate.py,sha256=uPpH9MYiDUKVbiRUTlXg8uY3dPyTlGPyx0XGcCE10LE,2956
4
4
  mapillary_tools/config.py,sha256=jCjaK4jJaTY4AV4qf_b_tcxn5LA_uPsEWlGIdm2zw6g,2103
@@ -20,7 +20,7 @@ mapillary_tools/types.py,sha256=o9S6VnY1NWTbIoXDD_tL_UQkzVyXo9iR4uAc8qJ7tuo,2124
20
20
  mapillary_tools/upload.py,sha256=kLQowiTfK8JrZqi7Yn7qcJllTjHZs60695S4QYvE_Ag,29513
21
21
  mapillary_tools/upload_api_v4.py,sha256=-JlrPg5lCAo959jAbL8lYl72gTgQ3o-MawFuAQJ8Uj0,8596
22
22
  mapillary_tools/uploader.py,sha256=3F0d8BCddP7qFQ_AyAvKrApZTEtTk1zWHpco9iRtA4I,14115
23
- mapillary_tools/utils.py,sha256=-MQYta846r13mlp8VikUVly9izaMkajeCsjoGzc5gUI,5043
23
+ mapillary_tools/utils.py,sha256=Sg1dVCC1taOTGp02E4M1k70leA9BvBm0mmxiNH2VZ5w,5265
24
24
  mapillary_tools/commands/__init__.py,sha256=wz89o8syKkWwoOCp3WBgnFWc41TBQRzRi62TlOTmVNQ,188
25
25
  mapillary_tools/commands/__main__.py,sha256=moSvBV_2IivqZTp6AtcpdtpwZAffKCje4B0kkojSUhQ,4859
26
26
  mapillary_tools/commands/authenticate.py,sha256=4aVvAQal_mqtm2NEMBt5aKLahi0iRdO8b7WSBf6jokA,1136
@@ -57,9 +57,9 @@ mapillary_tools/geotag/mp4_sample_parser.py,sha256=UxBqs0vFTA4qVth1ELkeBGElmW465
57
57
  mapillary_tools/geotag/simple_mp4_builder.py,sha256=-0ZFe0rnFYNcRxxBLrrqytl5GPnKToUH8TPEYjZkjZs,11981
58
58
  mapillary_tools/geotag/simple_mp4_parser.py,sha256=eji6JZa497wK8CY8hQt21fjgtnd0nzuyBx7MPEKST74,6671
59
59
  mapillary_tools/geotag/utils.py,sha256=Orl35Df4ypxj4v6Lu1Mhk9d2XZxa8yNffz1s1C0JZsQ,651
60
- mapillary_tools-0.10.3a0.dist-info/LICENSE,sha256=l2D8cKfFmmJq_wcVq_JElPJrlvWQOzNWx7gMLINucxc,1292
61
- mapillary_tools-0.10.3a0.dist-info/METADATA,sha256=skq4jR3Sp1o3f-E0ciqasAYQlTsfSKkArvXeqbrcPGw,15737
62
- mapillary_tools-0.10.3a0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
63
- mapillary_tools-0.10.3a0.dist-info/entry_points.txt,sha256=A3f3LP-BO_P-U8Y29QfpT4jx6Mjk3sXjTi2Yew4bvj8,75
64
- mapillary_tools-0.10.3a0.dist-info/top_level.txt,sha256=FbDkMgOrt1S70ho1WSBrOwzKOSkJFDwwqFOoY5-527s,16
65
- mapillary_tools-0.10.3a0.dist-info/RECORD,,
60
+ mapillary_tools-0.10.3a1.dist-info/LICENSE,sha256=l2D8cKfFmmJq_wcVq_JElPJrlvWQOzNWx7gMLINucxc,1292
61
+ mapillary_tools-0.10.3a1.dist-info/METADATA,sha256=3Uk8kud-vFU8MjBxUXFZjUp1M8JG_PCAA7lW6VsoJho,15737
62
+ mapillary_tools-0.10.3a1.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
63
+ mapillary_tools-0.10.3a1.dist-info/entry_points.txt,sha256=A3f3LP-BO_P-U8Y29QfpT4jx6Mjk3sXjTi2Yew4bvj8,75
64
+ mapillary_tools-0.10.3a1.dist-info/top_level.txt,sha256=FbDkMgOrt1S70ho1WSBrOwzKOSkJFDwwqFOoY5-527s,16
65
+ mapillary_tools-0.10.3a1.dist-info/RECORD,,