mapillary-downloader 0.7.8__py3-none-any.whl → 0.8.0__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.
@@ -85,8 +85,8 @@ def write_exif_to_image(image_path, metadata):
85
85
  exif_dict["0th"][piexif.ImageIFD.DateTime] = datetime_bytes
86
86
  exif_dict["Exif"][piexif.ExifIFD.DateTimeOriginal] = datetime_bytes
87
87
  exif_dict["Exif"][piexif.ExifIFD.DateTimeDigitized] = datetime_bytes
88
- exif_dict["Exif"][piexif.ExifIFD.SubSecTimeOriginal] = ('000'+str(metadata["captured_at"] % 1000))[-3:]
89
- exif_dict["Exif"][piexif.ExifIFD.SubSecTimeDigitized] = ('000'+str(metadata["captured_at"] % 1000))[-3:]
88
+ exif_dict["Exif"][piexif.ExifIFD.SubSecTimeOriginal] = ("000" + str(metadata["captured_at"] % 1000))[-3:]
89
+ exif_dict["Exif"][piexif.ExifIFD.SubSecTimeDigitized] = ("000" + str(metadata["captured_at"] % 1000))[-3:]
90
90
 
91
91
  # GPS data - prefer computed_geometry over geometry
92
92
  geometry = metadata.get("computed_geometry") or metadata.get("geometry")
@@ -101,8 +101,8 @@ def write_exif_to_image(image_path, metadata):
101
101
  exif_dict["GPS"][piexif.GPSIFD.GPSLongitude] = decimal_to_dms(lon)
102
102
  exif_dict["GPS"][piexif.GPSIFD.GPSLongitudeRef] = b"E" if lon >= 0 else b"W"
103
103
 
104
- # GPS Altitude - prefer computed_altitude over altitude
105
- altitude = metadata.get("computed_altitude") or metadata.get("altitude")
104
+ # GPS Altitude - prefer raw altitude (photogrammetry can't compute elevation)
105
+ altitude = metadata.get("altitude") or metadata.get("computed_altitude")
106
106
  if altitude is not None:
107
107
  altitude_val = int(abs(altitude) * 100)
108
108
  logger.debug(f"Raw altitude value: {altitude}, calculated: {altitude_val}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mapillary_downloader
3
- Version: 0.7.8
3
+ Version: 0.8.0
4
4
  Summary: Archive user data from Mapillary
5
5
  Author-email: Gareth Davidson <gaz@bitplane.net>
6
6
  Requires-Python: >=3.10
@@ -32,7 +32,7 @@ Provides-Extra: dev
32
32
 
33
33
  Download your Mapillary data before it's gone.
34
34
 
35
- ## Installation
35
+ ## ▶️ Installation
36
36
 
37
37
  Installation is optional, you can prefix the command with `uvx` or `pipx` to
38
38
  download and run it. Or if you're oldskool you can do:
@@ -41,7 +41,7 @@ download and run it. Or if you're oldskool you can do:
41
41
  pip install mapillary-downloader
42
42
  ```
43
43
 
44
- ## Usage
44
+ ## Usage
45
45
 
46
46
  First, get your Mapillary API access token from
47
47
  [the developer dashboard](https://www.mapillary.com/dashboard/developers)
@@ -75,12 +75,14 @@ The downloader will:
75
75
  * 🏛️ Check Internet Archive to avoid duplicate downloads
76
76
  * 📷 Download multiple users' images organized by sequence
77
77
  * 📜 Inject EXIF metadata (GPS coordinates, camera info, timestamps,
78
- compass direction)
78
+ compass direction) and XMP data for panoramas.
79
79
  * 🗜️ Convert to WebP (by default) to save ~70% disk space
80
- * 🛟 Save progress so you can safely resume if interrupted
81
- * 📦 Tar sequence directories (by default) for faster uploads to Internet Archive
80
+ * 🛟 Save progress every 5 minutes so you can safely resume if interrupted
81
+ ()
82
+ * 📦 Tar sequence directories (by default) for faster uploads to Internet
83
+ Archive
82
84
 
83
- ## WebP Conversion
85
+ ## 🖼️ WebP Conversion
84
86
 
85
87
  You'll need the `cwebp` binary installed:
86
88
 
@@ -94,11 +96,7 @@ brew install webp
94
96
 
95
97
  To disable WebP conversion and keep original JPEGs, use `--no-webp`:
96
98
 
97
- ```bash
98
- mapillary-downloader --no-webp USERNAME
99
- ```
100
-
101
- ## Tarballs
99
+ ## 📦 Tarballs
102
100
 
103
101
  Images are organized by capture date (YYYY-MM-DD) for incremental archiving:
104
102
 
@@ -116,16 +114,20 @@ mapillary-username-quality/
116
114
  ```
117
115
 
118
116
  By default, these date directories are automatically tarred after download
119
- (resulting in `2024-01-15.tar`, `2024-01-16.tar`, etc.). This date-based
120
- organization enables:
117
+ (`2024-01-15.tar`, `2024-01-16.tar`, etc.). Reasons:
121
118
 
122
- - **Incremental uploads** - Upload each day's tar as soon as it's ready
123
- - **Manageable file counts** - ~365 days/year × 10 years = 3,650 tars max
124
- - **Chronological organization** - Natural sorting and progress tracking
119
+ * ⤴️ Incremental uploads. Add more to a collection. Well, eventually anyway.
120
+ This won't work yet unless you delete the jsonl file and start again.
121
+ * 📂 Fewer files - ~365 days/year × 10 years = 3,650 tars max. IA only want
122
+ 5k items per collection
123
+ * 🧨 Avoids blowing up IA's derive workers. We don't want Brewster's computers
124
+ to create thumbs for 2 billion images.
125
+ * 💾 I like to have a few inodes available for things other than this. I'm sure
126
+ you do too.
125
127
 
126
128
  To keep individual files instead of creating tars, use the `--no-tar` flag.
127
129
 
128
- ## Internet Archive upload
130
+ ## 🏛️ Internet Archive upload
129
131
 
130
132
  I've written a bash tool to rip media then tag, queue, and upload to The
131
133
  Internet Archive. The metadata is in the same format. If you symlink your
@@ -139,15 +141,11 @@ See inlay for details:
139
141
 
140
142
  To see overall project progress, or an estimate, use `--stats`
141
143
 
142
- ```bash
143
- mapillary-downloader --stats
144
- ```
145
-
146
144
  ## 🚧 Development
147
145
 
148
146
  ```bash
149
147
  make dev # Setup dev environment
150
- make test # Run tests
148
+ make test # Run tests. Note: requires `exiftool`
151
149
  make dist # Build the distribution
152
150
  make help # See other make options
153
151
  ```
@@ -160,12 +158,12 @@ make help # See other make options
160
158
  * [🐱 github](https://github.com/bitplane/mapillary_downloader)
161
159
  * [📀 rip](https://bitplane.net/dev/sh/rip)
162
160
 
163
- ## License
161
+ ## ⚖️ License
164
162
 
165
163
  WTFPL with one additional clause
166
164
 
167
165
  1. Don't blame me
168
166
 
169
167
  Do wtf you want, but don't blame me if it makes jokes about the size of your
170
- disk drive.
168
+ disk.
171
169
 
@@ -2,7 +2,7 @@ mapillary_downloader/__init__.py,sha256=KEjiBRghXDeA7E15RJeLBfQm-yNJkowZarL59QOh
2
2
  mapillary_downloader/__main__.py,sha256=iuDGZoFVu8q_dTvJuExSpj4Jx1x9xASSjUITRGwd0RA,4864
3
3
  mapillary_downloader/client.py,sha256=a5n43FLHP45EHodEjl0ieziBK-b6Ey-rZJwYB6EFhNI,4743
4
4
  mapillary_downloader/downloader.py,sha256=l6MT3dFOB-lZfoLEVVGIkioKSXcDu30Q9xc2MZ17iGI,18897
5
- mapillary_downloader/exif_writer.py,sha256=_a70l9NS9pf8qTBAWVRdkh1edZHGOVjNDevYWrBoMoo,5187
5
+ mapillary_downloader/exif_writer.py,sha256=Dwh6RFotCnI4HVRQNqmsuWy05BPQYh3tMOQlKUk0gL8,5213
6
6
  mapillary_downloader/ia_check.py,sha256=L2MEbG_KmlAd5NLmo2HQkO8HWvRN0brE5wXXoyNMbq8,1100
7
7
  mapillary_downloader/ia_meta.py,sha256=DTmFwIKN03aNgBaerQWF5x_hveDpjvrMBTdRAgHoFRk,6365
8
8
  mapillary_downloader/ia_stats.py,sha256=kjbNUVXtZziWxTx1yi2TLTZt_F0BWjrv1WWyy6ZeCLY,10678
@@ -14,8 +14,8 @@ mapillary_downloader/webp_converter.py,sha256=vYLLQxDmdnqRz0nm7wXwRUd4x9mQZNah-D
14
14
  mapillary_downloader/worker.py,sha256=rMqeDj5pfLoEPwKOGN28R7yMZ_XDSzLayrL5ht0cqN0,5335
15
15
  mapillary_downloader/worker_pool.py,sha256=QnqYcPCi3GNu2e8GNG_qQ8v680PWzCZcGE5KeskqZxU,7868
16
16
  mapillary_downloader/xmp_writer.py,sha256=6kjAP3JpqVnknDETgjd8Ze-P7c1kMbmvuQ14GF0dMoA,5163
17
- mapillary_downloader-0.7.8.dist-info/entry_points.txt,sha256=PdYtxOXHMJrUhmiPO4G-F98VuhUI4MN9D_T4KPrVZ5w,75
18
- mapillary_downloader-0.7.8.dist-info/licenses/LICENSE.md,sha256=7_BIuQ-veOrsF-WarH8kTkm0-xrCLvJ1PFE1C4Ebs64,146
19
- mapillary_downloader-0.7.8.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
20
- mapillary_downloader-0.7.8.dist-info/METADATA,sha256=R3KrmR3R8vhDHWqBmEmIpKaKmZpsJfuQj5ohHnLSrqA,5540
21
- mapillary_downloader-0.7.8.dist-info/RECORD,,
17
+ mapillary_downloader-0.8.0.dist-info/entry_points.txt,sha256=PdYtxOXHMJrUhmiPO4G-F98VuhUI4MN9D_T4KPrVZ5w,75
18
+ mapillary_downloader-0.8.0.dist-info/licenses/LICENSE.md,sha256=7_BIuQ-veOrsF-WarH8kTkm0-xrCLvJ1PFE1C4Ebs64,146
19
+ mapillary_downloader-0.8.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
20
+ mapillary_downloader-0.8.0.dist-info/METADATA,sha256=cF1WSbpDbCjL9zCs2R8s8w1768-qfpUWgG_R1mL_q_w,5791
21
+ mapillary_downloader-0.8.0.dist-info/RECORD,,