Divinity.py script
Custom coded by Sharon from the /wiki/spaces/LibraryTechServices/pages/59087806. This script uses the Alma Remote Storage NCIP Check-in Item process as defined here.Â
Necessary elements for this NCIP call include the following:
- Remote storage code
- Circulation desk
- Item barcode
- Correct ncip URL (production vs. sandbox).
For the purposes of this project, Sharon has hardcoded the desk to be DIV.DIV_CIRC, in order to place the items into transit to HD. The remote storage code will also be HD.
Â
To run the script:
Save a file of barcodes in a text file (ex., something.dat) and save it in the hd directory of either of the following:
In sandbox:
/dropbox/ltsadmin/test/remote_storage/hd
In production:
/dropbox/ltsadmin/prod/remote_storage/hd
In this example, we will use prod, but sandbox can be used by substituting test for prod in any of the code below.
The root directory for the scan-in script is:
Â
[ltsadmin@kant bin]$ pwd
/dropbox/ltsadmin/prod/remote_storage/bin
Â
Run the script:
Log in to Kant and:
Â
               sudo su – ltsadmin
Â
copy the file into the hd directory (it must be named filename.dat The script won’t process files that aren’t named with a .dat extention:
Â
               /dropbox/ltsadmin/prod/remote_storage/hd
Â
Run the script:
Â
               cd /dropbox/ltsadmin/prod/remote_storage/bin/
python3 ./divinity.py --facility=hd --filename=filename.dat &
Â
NOTES:
This should run in the background if it’s a large file
A logfile will be generated at remote_storage/log/filename.YYMMDD