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

include_migrated_from_uri hard-codes SFU URL #485

Closed bondjimbond closed 5 years ago

bondjimbond commented 5 years ago

Ran the CdmSingleFile toolchain on some content from Athabasca...

<identifier type="uri" invalid="yes" displayLabel="Migrated From">http://content.lib.sfu.ca/cdm/ref/collection/Herbarium/id/670</identifier>

This should of course be http://deck.cs.athabascau.ca/cdm/ref/collection/Herbarium/id/670.

Is there a way to fix this within the .ini file?

mjordan commented 5 years ago

Not yet, see #176.

bondjimbond commented 5 years ago

That looks complex! So it's not as simple as, say, creating a new option (say, "migrated_from=(base CDM URL)") and replacing the hard-coded SFU base with the new variable? It feels like it should be pretty simple.

mjordan commented 5 years ago

Possibly - as long as if that new option was absent, no migrated_from identifier would be added (i.e., add that element is optional). @MarcusBarnes and @jonathangreen what do you think of this simpler approach, as opposed to the manipulator approach I had been pursuing?

bondjimbond commented 5 years ago

Yeah, that could work... By default, no migrated_from_uri happens. Here's my thought...

Instead of making include_migrated_from_uri TRUE or FALSE, make it the base URI for the CDM instance. If it's simpler to keep it required, then allow FALSE or a base URL.

So, if FALSE, keep the same code

If a base URL, follow the code for TRUE but replace http://content.lib.sfu.ca with the value of include_migrated_from_uri.

MarcusBarnes commented 5 years ago

The simpler approach would be good for resolving this quicker, both for @bondjimbond but also for other potential parties that may use MIK to move from CDM to Islandora (we may see an increase of this with the continuing work on ISLE). That said, the manipulator approach is still valuable and we should pursue this if there's sufficient community need for this flexibility of this approach.

bondjimbond commented 5 years ago

I'm thinking this approach meets the need pretty effectively. Perhaps we can leave the manipulator approach on the back burner for now and push the simple one through for expediency?

mjordan commented 5 years ago

@bondjimbond I'm all for that and thanks for suggesting this simpler approach. I'd like to hear from @jonathangreen before we move ahead with implementing it since he was interested in a solution to this problem too.

@bondjimbond are up able to open a PR for this?

jonathangreen commented 5 years ago

Simple solution works for me!

mjordan commented 5 years ago

Sweet, we're all on board then. Simplest solution wins!

bondjimbond commented 5 years ago

@mjordan I can attempt a PR, though I'd prefer you get issue-482 merged first... would make it a lot easier to test.

mjordan commented 5 years ago

OK, I'm cool with merging issue-482 with proper documentation. Being stretched in a bazillion directions but will get to a PR by end of the day.