docs: record the second reference pass and its gaps
Five usable sets added locally (hero daytime façades, the El Capitan Theatre block, night premiere staging, Ovation Hollywood, and the Lee Drug neighbour) — 41 images total, none committed. Records what remains missing: a sidewalk-level frame of the hero entry, the 6806-6822 retail run, and a night frame of 6840 itself rather than its neighbour. commons_fetch.py now survives a throttled download instead of discarding the rest of the batch, and takes --delay.
This commit is contained in:
1 parent
327c906a7c
commit
72de657202
2 files changed
+10
-3
No files matched your search
+1
-1
@@ -17,7 +17,7 @@ Repeatable import/export and processing helpers. Anything that was done twice by
|
|||||||
- `street_mesh.py` — road, kerbs, and sidewalks on the DEM, in the project frame; kerbs flush at the three crossings.
|
- `street_mesh.py` — road, kerbs, and sidewalks on the DEM, in the project frame; kerbs flush at the three crossings.
|
||||||
- `terrain_from_dem.py` — terrain grid from the committed DEM, with building footprints cut out.
|
- `terrain_from_dem.py` — terrain grid from the committed DEM, with building footprints cut out.
|
||||||
- `blosm_blockout.py` — headless Blosm import of the committed `.osm` extract into a `.blend`, with a per-building scale report. Exact invocation in `Art/blender/README.md`.
|
- `blosm_blockout.py` — headless Blosm import of the committed `.osm` extract into a `.blend`, with a per-building scale report. Exact invocation in `Art/blender/README.md`.
|
||||||
- `commons_fetch.py` — Wikimedia Commons reference fetcher. Search or exact `File:` titles, 1600 px thumbnails, provenance `sidecar.json` per folder. Writes only into the gitignored `Art/reference/`; reference images are never committed.
|
- `commons_fetch.py` — Wikimedia Commons reference fetcher. Search or exact `File:` titles, thumbnails, provenance `sidecar.json` per folder. Wikimedia throttles `upload.wikimedia.org` (HTTP 429), so keep batches to six or fewer files and pass `--delay 3`; a throttled file is skipped and recorded rather than aborting the run. Writes only into the gitignored `Art/reference/`; reference images are never committed.
|
||||||
|
|
||||||
## Planned helpers
|
## Planned helpers
|
||||||
- Blender export preset runner (named presets, metric scale assertion)
|
- Blender export preset runner (named presets, metric scale assertion)
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ def main() -> int:
|
|||||||
ap.add_argument("--limit", type=int, default=6)
|
ap.add_argument("--limit", type=int, default=6)
|
||||||
ap.add_argument("--width", type=int, default=1600, help="thumbnail width in px")
|
ap.add_argument("--width", type=int, default=1600, help="thumbnail width in px")
|
||||||
ap.add_argument("--dry-run", action="store_true")
|
ap.add_argument("--dry-run", action="store_true")
|
||||||
|
ap.add_argument("--delay", type=float, default=2.0, help="seconds between downloads")
|
||||||
args = ap.parse_args()
|
args = ap.parse_args()
|
||||||
|
|
||||||
if not args.query and not args.file:
|
if not args.query and not args.file:
|
||||||
@@ -199,7 +200,13 @@ def main() -> int:
|
|||||||
name = safe_name(item["title"], index)
|
name = safe_name(item["title"], index)
|
||||||
path = os.path.join(out_dir, name)
|
path = os.path.join(out_dir, name)
|
||||||
print(f" [{index}/{len(selected)}] {item['title']}")
|
print(f" [{index}/{len(selected)}] {item['title']}")
|
||||||
digest = download(item["download_url"], path)
|
try:
|
||||||
|
digest = download(item["download_url"], path)
|
||||||
|
except SystemExit as exc:
|
||||||
|
# one throttled file must not discard the ones already fetched
|
||||||
|
print(f" skipped: {exc}", flush=True)
|
||||||
|
time.sleep(args.delay * 5)
|
||||||
|
continue
|
||||||
item.update(
|
item.update(
|
||||||
{
|
{
|
||||||
"local_file": name,
|
"local_file": name,
|
||||||
@@ -208,7 +215,7 @@ def main() -> int:
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
records.append(item)
|
records.append(item)
|
||||||
time.sleep(1)
|
time.sleep(args.delay)
|
||||||
|
|
||||||
sidecar = {
|
sidecar = {
|
||||||
"fetched_utc": datetime.datetime.now(datetime.timezone.utc).isoformat(timespec="seconds"),
|
"fetched_utc": datetime.datetime.now(datetime.timezone.utc).isoformat(timespec="seconds"),
|
||||||
|
|||||||
Reference in new issue
Block a user