mjordan / iipqa

Command-line tool for applying Quality Assurance checks against Islandora import packages in preparation for importing them into Islandora.
GNU General Public License v3.0
3 stars 0 forks source link

Allow use of .zip files instead of directories #7

Closed mjordan closed 7 years ago

mjordan commented 7 years ago

Some (most?) Islandora users package up their objects for batch import in .zip files so they can upload them via the GUI. iipqa should allow users to validate the .zip. https://github.com/wapmorgan/UnifiedArchive appears to be a suitable Composer-friendly library for unzipping.

Proposed implementation would be that if the value of the target is a directory, iipqa would operate as it now does; if the target is a .zip, iipqa would unzip it into a temporary location and then apply its tests.

Any requirements for the structure of the .zip, such as that all import packages must be children of the top-level of the zip, should be checked as follows:

mjordan commented 7 years ago

Since we're only unzipping .zip files, http://php.net/manual/en/ziparchive.extractto.php is sufficient. This is what Islandora Batch uses.

mjordan commented 7 years ago

Closed with 726c4975754235edcc62fc502044de3dadc6650e.