mjordan / islandora_change_cmodel

Islandora utility module that provides the ability to change an object's content model.
GNU General Public License v3.0
0 stars 0 forks source link

Change mymodule to islandora_change_cmodel #8

Open DonRichards opened 5 years ago

DonRichards commented 5 years ago

Inside of the API file the script calls mymodule_islandora_change_cmodel_cmodel_changed instead of `islandora_change_cmodel_islandora_change_cmodel. Shouldn't this be of the same name as the module? I'm trying to help someone do this to an entire collection programmatically and I wonder if this will hold them back.

mjordan commented 5 years ago

@DonRichards sorry if I'm not understanding your question, but the API file contains only example functions. 'mymodule' is a placeholder for the name of the module implementing the hook (so yes, it should be the same as the name of the module). Sorry if that's stating the obvious, it's been a long day.

DonRichards commented 5 years ago

@mjordan No problem, just expected it to look like that. Is there any way to add a batch feature to this? I've been helping Katie from San Diego on this and she needs to migrate 5000 objects to scholar. Wasn't sure if adding a drush command would work.

mjordan commented 5 years ago

Excellent question - @bondjimbond opened up #6 a year ago to ask something very similar. It's possible to do it. But it's probably not possible for me to do the work to make it happen. I have even less spare cycles this summer than last. I'd be happy to test any PRs that might come my way however.

mjordan commented 5 years ago

A drush command would be a lot simpler than implementing a Batch with a GUI. From what I recall you'd need to change the cmodel and then generate any derivatives you need. This example from Datastream CRUD can kick off the derivative creation process.