Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postwritehook suggestion: reorganize output by filetype? #488

Open
bondjimbond opened this issue Sep 5, 2018 · 3 comments
Open

Postwritehook suggestion: reorganize output by filetype? #488

bondjimbond opened this issue Sep 5, 2018 · 3 comments

Comments

@bondjimbond
Copy link
Collaborator

Use case: I'm running CONTENTdm migrations right now, and just ran into an issue where, of a 619-item image collection, 614 are JPGs and 5 are JP2s. I failed to notice the JP2s, and attempted to ingest the whole set as Basic Images, which of course meant that the five JP2s were not ingested.

In migrations where the source collection contains a mix of content models, it would be helpful to create subdirectories in the output directory, so that objects with different filetypes were appropriately grouped. Should be doable with a post-write hook, I think?

e.g. Right now, my images are all poured into the directory herbarium_output. With the proposed post-write hook, the JPGs would get written to herbarium_output/jpg and the JP2s would go to herbarium_output/jp2.

@mjordan
Copy link
Collaborator

mjordan commented Sep 5, 2018

This might do the trick: https://github.com/MarcusBarnes/mik/blob/master/extras/scripts/postwritehooks/move_packages_by_extension.php

I just used it in our Summit migration, it was very useful.

@bondjimbond
Copy link
Collaborator Author

bondjimbond commented Sep 6, 2018

Ah, so it already exists! Awesome, thanks. Will give it a try.

@mjordan
Copy link
Collaborator

mjordan commented Oct 4, 2018

@bondjimbond did this work for you? If so, can you close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants