Introduction
This module implements a batch framework for importing books into Islandora.
...
- Preprocessing: The data is scanned and a number of entries are created in the Drupal database. There is minimal processing done at this point, so preprocessing can be completed outside of a batch process.
- Ingest: The data is actually processed and ingested. This happens inside of a Drupal batch.
Requirements
This module requires the following modules/libraries:
Installation
Install module as usual, see this for further information.
Configuration
N/A
Usage
The base ZIP/directory preprocessor can be called as a drush script (see drush help islandora_book_batch_preprocess
for additional parameters):
...
Custom ingests can be written by extending any of the existing preprocessors and batch object implementations.
Troubleshooting/Issues
Having problems or solved a problem? Check out the Islandora google groups for a solution.
Maintainers/Sponsors
Current maintainers:
Development
If you would like to contribute to this module, please check out CONTRIBUTING.md. In addition, we have helpful Documentation for Developers info, as well as our Developers section on the Islandora.ca site.
License
GPLv3
Additional Usage
Drush 7
Info |
---|
Drush made the target parameter reserved as of Drush 7. To allow for backwards compatibility, this will be preserved. The parameter has been renamed scan_target . |
Web options
Options are available for processing include:
Page progressions (left-to-right or right-to-left)
- Create PDF
- Namespace (default is repository's default namesapce)
- Generate OCR (run Tesseract on individual pages)
- Aggregate OCR (place individually generated OCR pages into one text file, whose datastream will be listed with the book object itself . This is helpful for searching and allows repository managers to disable individual page listings in Solr output.)
- Notify admin after ingest (if Rules have been set)
- Ingest immediately (ingest or delay queue for processing)
Command-line Book Batch options interaction with the Book Solution Pack ingest settings:
Code Block |
---|
|
Options:
--aggregate_ocr A flag to cause OCR to be aggregated to books, if OCR is also being generated per-page.
--content_models A comma-separated list of content models to assign to the objects. Only applies to the "book" level object.
--create_pdfs A flag to cause PDFs to be created in books. Page PDF creation is dependant on the configuration within Drupal proper.
--directory_dedup A flag to indicate that we should avoid repreprocessing books which are located in directories.
--do_not_generate_hocr A flag to allow for conditional HOCR generation.
--do_not_generate_ocr A flag to allow for conditional OCR generation.
--email_admin A flag to notify the site admin when the book is fully ingested (depends on Rules being enabled).
--namespace The namespace for objects created by this command. Defaults to namespce set in fedora config.
--output_set_id A flag to indicate whether to print the set ID of the preprocessed book.
--page_progression A flag to indicate the page progression for the book. If not specified will default to LR.
--parent The collection to which the generated items should be added. Only applies to the "book" level object. If "directory" and the directory containing the book description is a valid PID, it will be set as the parent. If this is specified and itself is a PID, all books will be related to the given PID.
--parent_relationship_pred The predicate of the relationship to the parent. Defaults to "isMemberOfCollection".
--parent_relationship_uri The namespace URI of the relationship to the parent. Defaults to "info:fedora/fedora-system:def/relations-external#".
--target The target to directory or zip file to scan. Required.
--type Either "directory" or "zip". Required.
--wait_for_metadata A flag to indicate that we should hold off on trying to ingest books until we have metadata available for themat the book level.
Aliases: ibbp
Example that will work inside of islandora_vagrant:
/var/www/drupal$ drush -v -u 1 --uri=http://localhost islandora_book_batch_preprocess --content_models=islandora:bookCModel --namespace=islandora --parent=islandora:1 --type=directory --target=/vagrant/dir_of_books --create_pdfs=TRUE |
...