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

Make migrated from URI configurable #450

Closed jonathangreen closed 6 years ago

jonathangreen commented 6 years ago

Looks like the migrated from URI is currently hard coded to contain http://content.lib.sfu.ca/cdm/ref/collection/: https://github.com/MarcusBarnes/mik/blob/master/src/metadataparsers/mods/CdmToMods.php#L169

Be nice to be able to override that with your own CDM url.

mjordan commented 6 years ago

Totally. Sorry we didn't catch this earlier. We already use Twig templates so maybe providing a config option to point to one of those is a possible solution.

jonathangreen commented 6 years ago

No worries! Just wanted to make a ticket to note it, since i just stumbled upon it. A small twig template makes sense to me.

mjordan commented 6 years ago

I think we already have the solution to this problem in https://github.com/MarcusBarnes/mik/wiki/Metadata-manipulator:-InsertXmlFromTemplate. We should just remove the include_migrated_from_uri .ini option and document how to add the following snippet:

 <identifier type="uri" invalid="yes" displayLabel="Migrated From">http://contentdm.example.com/cdm/ref/collection/foo/id/{{ ID  }}</identifier>
mjordan commented 6 years ago

Note: we would also need to remove https://github.com/MarcusBarnes/mik/blob/master/src/metadataparsers/mods/CdmToMods.php#L163-L172.

mjordan commented 6 years ago

@jonathangreen If I opened a PR for this would you be able to test?

mjordan commented 6 years ago

Yikes, found #176 while sifting through old issues to close.

jonathangreen commented 6 years ago

@mjordan I can close this as a duplicate if you want? I am also willing to test.

mjordan commented 6 years ago

@jonathangreen yes please, close this one. I'll pick up the work over at #176. Will have something for you to test this week.

jonathangreen commented 6 years ago

Duplicate

mjordan commented 6 years ago

[sorry, I posted a comment here that was meant for #176. I then deleted it and posted it there :face_with_head_bandage: ]