-
Notifications
You must be signed in to change notification settings - Fork 0
Process EPUB Resource References
Timothy W Belch edited this page Oct 28, 2019
·
6 revisions
This monograph processing step can be completed by using the following project script:
script/process_monograph [-e] [-p <publisher_directory>] <action> <monograph_noid> [<monograph_noid>..]
action Specified resource action, either embed_resources|link_resources
-e Execute the specific resource action. Otherwise, actions are identified and displayed, but not executed.
publisher_directory Directory that contains a specific publisher monographs.
monograph_noid Monograph NOID
The script will perform the following:
- Download the manifest for the specified monograph NOID.
- Use the monograph manifest to locate the monograph directory (MONOGRAPH_DIR=FULCRUM_DRIVE/<publisher>/<ebook_isbn>_<author_last_name>) found in the publisher directory which is specified either by the
-p <publisher_directory>option, or by the current working directory. - Locate the monograph EPUB file (EPUB_FILE=MONOGRAPH_DIR/<ebook_isbn>_<author>.epub).
- Assign an action for each resource, either embed a resource viewer or insert a link to the Fulcrum resource page. This is determined by the command line argument
<action>, either embed_resources or link_resources. - Scan EPUB_FILE and for each resource reference encountered, report the action assigned. If the
-eoption has been specified, then execute the action and save the file in the MONOGRAPH_DIR/resource_processing/epub directory. - Create a new EPUB file (NEW_EPUB_FILE=MONOGRAPH_DIR/resource_processing/<ebook_isbn>_<author>.epub) that is a copy of the original except for replacing any modified files with the ones found in the **MONOGRAPH_DIR/resource_processing/epub directory.