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 #452. #453

Closed mjordan closed 6 years ago

mjordan commented 6 years ago

Github issue: #452

What does this Pull Request do?

Fixes a bug that writes out incorrectly named JPEG datastreams created by the CONTENTdm newspapers and CONTENTdm books toolchains.

What's new?

Changed the name of an output file in both of the affected writer classes.

How should this be tested?

I've tested this against a CONTENTdm instance, with one book, using the following [WRITER] section in my .ini file:

[WRITER]
class = CdmBooks
alias = yyyyyyy
ws_url = "http://xxxxxxxxxxxxxxxx/dmwebservices/index.php?q="
output_directory = "/tmp/issue_452"
; Leave blank for Cdm single file objects (the MIK writer assigns the filename).
metadata_filename =
datastreams[] = MODS
datastreams[] = JPG

The JPEG datastream is now named properly (JPG instead of JPEG):

/tmp/issue_452
├── 3549
│   ├── 1
│   │   ├── JPG.jpg
│   │   ├── MODS.xml
│   │   └── OBJ.jpg
│   ├── 2
│   │   ├── JPG.jpg
│   │   ├── MODS.xml
│   │   └── OBJ.jpg
│   ├── 3
│   │   ├── JPG.jpg
│   │   ├── MODS.xml
│   │   └── OBJ.jpg
│   ├── 4
│   │   ├── JPG.jpg
│   │   ├── MODS.xml
│   │   └── OBJ.jpg
│   ├── 5
│   │   ├── JPG.jpg
│   │   ├── MODS.xml
│   │   └── OBJ.jpg
│   ├

[...]

I can't find any CONTENTdm to test with newspapers, but the CdmNewspapers writer works basically the same as the CdmBooks writer around the affected code.

Other

Toolchain wiki pages https://github.com/MarcusBarnes/mik/wiki/Toolchain:-CONTENTdm-books and https://github.com/MarcusBarnes/mik/wiki/Toolchain:-CONTENTdm-newspapers will need to be updated to reflect the new DSID.

mjordan commented 6 years ago

Thanks. I've updated the toolchains' wiki pages.