====== Batch SP ====== \\ cd /var/www/smarch.to.cnr.it/sites/all/modules/ git clone git://github.com/Islandora/islandora_batch git clone git://github.com/Islandora/islandora_book_batch drush -u 1 en islandora_batch islandora_book_batch git clone git://github.com/mjordan/islandora_datastream_crud drush -u 1 en islandora_datastream_crud \\ Example: cd /var/www/smarch.to.cnr.it drush -v -u 1 --uri=http://smarch.to.cnr.it islandora_book_batch_preprocess --namespace=fabbtext --parent=islandora:bookCollection --content_models=islandora:bookCModel --type=zip --target=/home/user/book/Conte74.zip drush -v -u 1 --uri=http://smarch.to.cnr.it islandora_batch_ingest drush -v -u 1 --uri=http://smarch.to.cnr.it islandora_batch_scan_preprocess --content_models=islandora:sp_large_image_cmodel --parent=islandora:sp_large_image_collection --parent_relationship_pred=isMemberOfCollection --type=zip --target=/home/user/001.zip drush -v -u 1 --uri=http://smarch.to.cnr.it islandora_batch_ingest \\ \\ Example CSV->DC CRUD * spreadsheet with DC elements in columns, multiple values into same cell separated by | * convert spreadsheet to CSV using § as field separator * run CSV2DC.sh script to convert data into files ready for CRUD replace DS #!/bin/bash INPUT=$1 OLDIFS=$IFS IFS='§' [ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; } while read TITLE DATE COVERAGE DESCRIPTION SOURCE SUBJECT CONTRIBUTOR IDENTIFIER CREATOR PUBLISHER TYPE LANGUAGE do # echo $TITLE $DATE $COVERAGE $DESCRIPTION $SOURCE $SUBJECT $CONTRIBUTOR $IDENTIFIER $CREATOR $PUBLISHER $TYPE $LANGUAGE FNAME=${IDENTIFIER//:/_} shopt -s extglob FNAME="${FNAME##*( )}" FNAME="${FNAME%%*( )}" shopt -u extglob FNAME=$FNAME'_DC.xml' touch $FNAME echo '' > $FNAME #title echo ''$TITLE'' >> $FNAME #date echo ''$DATE'' >> $FNAME #description IFS='|' read -ra ELEM <<< "$DESCRIPTION" for i in "${ELEM[@]}"; do echo ''$i'' >> $FNAME done IFS='§' #coverage IFS='|' read -ra ELEM <<< "$COVERAGE" for i in "${ELEM[@]}"; do echo ''$i'' >> $FNAME done IFS='§' #source IFS='|' read -ra ELEM <<< "$SOURCE" for i in "${ELEM[@]}"; do echo ''$i'' >> $FNAME done IFS='§' #subject IFS='|' read -ra ELEM <<< "$SUBJECT" for i in "${ELEM[@]}"; do echo ''$i'' >> $FNAME done IFS='§' #contributor IFS='|' read -ra ELEM <<< "$CONTRIBUTOR" for i in "${ELEM[@]}"; do echo ''$i'' >> $FNAME done IFS='§' #creator IFS='|' read -ra ELEM <<< "$CREATOR" for i in "${ELEM[@]}"; do echo ''$i'' >> $FNAME done IFS='§' #publisher IFS='|' read -ra ELEM <<< "$PUBLISHER" for i in "${ELEM[@]}"; do echo ''$i'' >> $FNAME done IFS='§' #type IFS='|' read -ra ELEM <<< "$TYPE" for i in "${ELEM[@]}"; do echo ''$i'' >> $FNAME done IFS='§' #language IFS='|' read -ra ELEM <<< "$LANGUAGE" for i in "${ELEM[@]}"; do echo ''$i'' >> $FNAME done IFS='§' echo '' >> $FNAME done < $INPUT IFS=$OLDIFS * Run CRUD replace DS