parameterize dump images step to work with custom data paths
This commit is contained in:
parent
e424361ed9
commit
07fef7fbab
3 changed files with 19 additions and 9 deletions
|
|
@ -19,7 +19,12 @@ class Listing:
|
|||
for listing_path in listing_paths:
|
||||
with open(listing_path) as f:
|
||||
d = json.load(f)
|
||||
identifiers.append(Listing(d["identifier"]))
|
||||
|
||||
# data_dir is the first directory before the listing_path
|
||||
data_dir = pathlib.Path(listing_path)
|
||||
while str(d['identifier']) in str(data_dir.resolve().absolute()):
|
||||
data_dir = data_dir.parent
|
||||
identifiers.append(Listing(d["identifier"], data_dir=data_dir))
|
||||
|
||||
return identifiers
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue