You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.
I'm trying out the utilities you provide and noticed that get_captures.py is not returning the capture ids, maybe the json format changed since that was initially created? I ran it as python get_captures.py data-and-utilities/items/pd_items_1.ndjson captures_pd_items_1.json (data-and-utilities is your repo) and got:
50000 items with no captures
0 items with invalid captures
Wrote 50000 lines to captures_pd_items_1.json
In order to get it to return the IDs I patched get_captures as shown next:
--- get_captures.py 2016-09-28 19:06:39.000000000 -0300
+++ get_captures_gp.py 2016-09-28 19:17:36.000000000 -0300
@@ -32,8 +32,10 @@
# Retrieve capture ids of item's first capture
captureId = ""
- if "captureIds" in item and len(item["captureIds"]) > 0:
- captureId = item["captureIds"][0].strip()
+ if "captures" in item and len(item["captures"]) > 0:
+ match = re.match(imageURLPattern, item['captures'][0])
+ if match:
+ captureId = match.groups()[0]
else:
noCaptureCount += 1
New results:
$ python get_captures_gp.py data-and-utilities/items/pd_items_1.ndjson captures_pd_items_1.json
0 items with no captures
0 items with invalid captures
Wrote 50000 lines to captures_pd_items_1.json
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying out the utilities you provide and noticed that
get_captures.py
is not returning the capture ids, maybe the json format changed since that was initially created? I ran it aspython get_captures.py data-and-utilities/items/pd_items_1.ndjson captures_pd_items_1.json
(data-and-utilities is your repo) and got:In order to get it to return the IDs I patched get_captures as shown next:
New results:
The text was updated successfully, but these errors were encountered: