denshoproject / ddr-cmdln

Command-line tools for automating the Densho Digital Repository's various processes.
Other
0 stars 2 forks source link

ddr-import creates a spurious dir in `files` when importing an `external` File #77

Closed GeoffFroh closed 6 years ago

GeoffFroh commented 6 years ago

ddr-import can import Files that are stored outside of the collection repo's git-annex. This is usually the case with VH video segments (housed at IA). External Files are identified by the value "1" in the external field of the import CSV file.

ddr-import appears to create the external File's json in the parent Entity's files/ directory and properly modifies the parent's entity.json as expected; but also creates an extra empty dir inside of files/ that is named with the external File's identifier.

gjost commented 6 years ago

Can you give me an example line or two (with headers) from the CSV used for the import?

GeoffFroh commented 6 years ago

(Uploaded with the txt extension 'cause github doesn't take csv?! But xlsx and zip? Fantastic...)

DDRIMPORT-ddr-densho-1004-11-files.csv.txt

GeoffFroh commented 6 years ago

FWIW, this does not seem to cause any issues with git/git-annex since the dirs are empty. I.e., they are just extra cruft in the local working dir.

gjost commented 6 years ago

Thanks for the sample data. FWIW git/git-annex will ignore empty directories so they won't appear in clones.

gjost commented 6 years ago

Fixed in commit c60fcb4 on develop