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

Oai-Pmh make directory if does not exist #504

Closed bondjimbond closed 4 years ago

bondjimbond commented 5 years ago

Github issue: (#503)

What does this Pull Request do?

Checks if directory exists before creating the XML file. If it doesn't, create the directory first.

What's new?

In some cases, the OAI endpoint will include a directory in the record ID representing the set. MIK fails if the directory does not already exist. Now we write it.

How should this be tested?

Use the attached file (change txt to ini). Note failure to produce metadata until this branch is checked out. (The failure to produce the files is another issue.) mru_oai.txt

Interested parties

@mjordan @MarcusBarnes

bondjimbond commented 5 years ago

This PR addresses #503.

bondjimbond commented 5 years ago

@MarcusBarnes Any thoughts on this? It's working for me.

bondjimbond commented 5 years ago

I added a new filegetter here too, just to make it possible to extract the file from a MODS record. I can remove this commit if it's out of scope for the PR.

MarcusBarnes commented 5 years ago

@bondjimbond It's better for when searching the issue history to have the filegetter in a separate PR.

bondjimbond commented 5 years ago

OK, filegetter removed.