MarcusBarnes / mik

The Move to Islandora Kit is an extensible PHP command-line tool for converting source content and metadata into packages suitable for importing into Islandora (or other digital repository and preservations systems).
GNU General Public License v3.0
34 stars 11 forks source link

Work on #498. #499

Closed mjordan closed 5 years ago

mjordan commented 5 years ago

Github issue: #498

What does this Pull Request do?

Allows the use of book and newspaper page files to end in all zeros (e.g. page-00.tif).

What's new?

In the CsvBook and CsvNewspaper writers, tests to see if the page number is empty, which would result if the page number segment of a filename is comprised of all zeros. If it is, the page number variable is assigned a value of 0 in order to generate the correct directory name.

How should this be tested?

This change must be smoke tested. There are no PHPUnit tests.

Using the data and configuration files in the attached zip file:

  1. modify the issue_498_books.ini and issue_498_newspapers.ini configuration files to suit your system paths, etc.
  2. in the master branch, run MIK on both .ini files. You should encounter errors starting with "message":"mkdir(): File exists" in your mik.log. Page directories for pages with all zeros in their filenames (issue_498_books/book3/page-00.tif and issue_498_newspapers/1920-06-02/page-00.tif) will not have been created in the output.
  3. check out the issue-498 branch and rerun MIK on both config files. There should be no errors, and all the page directories should have been created.

Additional Notes

Interested parties

@bondjimbond issue_498_test_data.zip

mjordan commented 5 years ago

Bump.