Conversation
…e islandora model in the model map.
ctgraham
left a comment
There was a problem hiding this comment.
Initial readthrough with some questions and suggestions.
| logger.info(f"File is model: {imodel}, TID: {field_model}") | ||
|
|
||
| # Process any .tif files. | ||
| if (file_ext.lower() == ".tif"): |
There was a problem hiding this comment.
Special processing by type would be a good candidate to break out into separate functions for readability.
There was a problem hiding this comment.
The pattern of "Handle top level files" ... "Build row data" is also heavily repeated here.
There was a problem hiding this comment.
Agreed with separate functions for readability. This would probably be a next step as I was building these out as I went along. However, the row_data per each file type can be different and is based upon information that is gathered initially. To accommodate this would require re-thinking the process_file function to either pass the information to each file type function to derive itself duplicating code, or we would have to pass that information into the file functions making the parameters pretty unwieldy. Unless really needed I'd like to stay as is for now. I'm open to discus how to handle this if wanted.
…as being the first value from the return column.
This PR addresses issue #1.
This is a full rewrite of the original scan-batch-dir script to allow it to be more modular so that changes needed in the future should be easier to implement. This also added the ability to use PDF files as newspaper issues.