Index: 3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/01-ARCHIVE-TO-ITEM.sh
===================================================================
--- /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/01-ARCHIVE-TO-ITEM.sh	(revision 37221)
+++ 	(revision )
@@ -1,62 +1,0 @@
-#!/bin/bash
-
-# HMS_1/HMS_1.pdf
-
-if [ ! -d Items ] ; then
-    echo ""
-    echo "Creating directory: Items"
-    echo ""
-    mkdir Items
-fi
-
-#for full_archive_dir in Archive/HMS_*[0-9] Archives/BMS_[0-9]_[0-9]_*[0-9] ; do
-#for full_archive_dir in Archive/* ; do
-for full_archive_dir in InterMusE_Images/* ; do
-    
-    echo "Processing $full_archive_dir"
-    archive_dir=${full_archive_dir##*/}
-    vol=${archive_dir#*_}
-    
-    full_item_dir=GS_Items/${archive_dir}
-    item_dir=${archive_dir}
-    
-    /bin/rm -rf $full_item_dir
-    mkdir $full_item_dir
-    #mkdir $full_item_dir/TIFFs
-    mkdir $full_item_dir/JPEGs
-
-    full_item_filename=$full_item_dir/$archive_dir.item
-
-    echo ""
-    echo "Generating $full_item_filename"
-    echo ""
-   
-    echo "<Volume>$vol" > $full_item_filename
-    
-    #images=$(cd $full_archive_dir/TIFFs && ls ${archive_dir}_[0-9][0-9][0-9][0-9].tif)
-    #images=$(cd $full_archive_dir/JPEGs && ls ${archive_dir}_[0-9][0-9][0-9][0-9].jpg)
-    images=$(cd $full_archive_dir/JPEGs && ls ${archive_dir}_*[0-9].jpg)    
-
-    echo "  Appending/Copying Images"
-    for image in $images ; do
-	page_num_with_ext=${image#_}
-	#page_num=${page_num_with_ext%.tif}
-	page_num=${page_num_with_ext%.jpg}
-	
-	#echo "    $full_archive_dir/TIFFs/$image -> $full_item_dir/TIFFs/$image"
-	#/bin/cp $full_archive_dir/TIFFs/$image $full_item_dir/TIFFs/$image
-	echo "    $full_archive_dir/JPEGs/$image -> $full_item_dir/JPEGs/$image"
-	/bin/cp $full_archive_dir/JPEGs/$image $full_item_dir/JPEGs/$image
-
-	# Only image, no ocr'd txt file
-	#echo "$page_num:TIFFs/$image:" >> $full_item_filename
-	echo "$page_num:JPEGs/$image:" >> $full_item_filename
-    done
-
-    
-
-done
-
-echo ""
-
-
Index: /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/01-RCLONE-SPREADSHEET.sh
===================================================================
--- /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/01-RCLONE-SPREADSHEET.sh	(revision 37222)
+++ /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/01-RCLONE-SPREADSHEET.sh	(revision 37222)
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+doc_id=1Vhge61P_-bi2k5Vc7KZcks4eu1Aq_EqC
+
+tmp_cookie_filename=/tmp/gdrive-cookies-$$
+tmp_download_filename=/tmp/gdrive-download-$$.csv
+
+ofilename="intermuse-catalogue.csv"
+
+#curl -c $tmp_cookie_filename "https://drive.google.com/uc?export=download&id=$doc_id" > $tmp_download_filename
+
+#curl -L -b $tmp_cookie_filename \
+#     "https://drive.google.com$(cat /tmp/gdrive-download-$$.csv | grep -Po 'uc-download-link" [^>]* href="\K[^"]*' | sed 's/\&amp;/\&/g')" > $ofilename
+
+
+#rclone copy "gdrive-davidb:research/projects/InterMusE-project.lnk/Website files/HMS Catalogue.csv" HMS-Catalgoue.csv
+rclone copy "gdrive-davidb:research/projects/InterMusE-project.lnk/Website files/HMS Catalogue.xlsx" HMS-Catalgoue.xlsx
+
+# Digitised materials ready for digital archive/InterMusE_Images"
+
Index: /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/02-CONVERT-XLSX-TO-CSV.sh
===================================================================
--- /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/02-CONVERT-XLSX-TO-CSV.sh	(revision 37222)
+++ /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/02-CONVERT-XLSX-TO-CSV.sh	(revision 37222)
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+
+./xlsx-to-csv.py
+
+if [ $? != 0 ] ; then
+    echo ""
+    echo "Failed to run Python script:"
+    echo "  (1) Are you using the Greenstone3's self-contained Python3?"
+    echo "  (2) Have you install the Python module openpyxl with:"
+    echo "        pip install openpyxl"
+fi
+
+
Index: 3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/02-COPY-TO-IMPORT.sh
===================================================================
--- /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/02-COPY-TO-IMPORT.sh	(revision 37221)
+++ 	(revision )
@@ -1,27 +1,0 @@
-#!/bin/bash
-
-echo 'Copying GS_Items/*_*[0-9] directories to ../import'
-
-#for full_d in Items/HMS_* ; do
-for full_d in GS_Items/*_*[0-9] ; do
-    d=${full_d##*/}
-    if [ -d ../import/$d ] ; then
-	echo "  Removing pre-existing ../import/$d"
-	/bin/rm -r ../import/$d
-    fi
-
-    #echo "  Copying $d"
-    #/bin/cp -r $full_d ../import/.
-
-    # Example of recursive copy that uses hardlinks for files
-    # rsync -av --link-dest="$PWD/a" a/ b
-    #
-    # For more details see (down near the bottom)
-    #   https://unix.stackexchange.com/questions/202430/how-to-copy-a-directory-recursively-using-hardlinks-for-each-file
-
-    echo "  Hardlink file recursive copying $d"
-    rsync -av --link-dest="$PWD/$full_d" $full_d/ ../import/$d
-
-
-done
-
Index: /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/03-COPY-SPREADSHEET-TO-IMPORT-SMALL.sh
===================================================================
--- /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/03-COPY-SPREADSHEET-TO-IMPORT-SMALL.sh	(revision 37222)
+++ /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/03-COPY-SPREADSHEET-TO-IMPORT-SMALL.sh	(revision 37222)
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+if [ ! -d ../import-small ] ; then
+    echo ""
+    echo "Creating directory:"
+    echo "  import-small"
+    echo ""
+    mkdir ../import-small
+fi
+
+#ifilename="HMS Catalogue.xlsx - Table.csv"
+#ofilename="../import-small/HMS Catalogue.xlsx - Table-SMALL.csv"
+
+
+ifilename="HMS-Catalogue.csv"
+ofilename="../import-small/HMS-Catalogue-SMALL.csv"
+
+echo ""
+echo "Copying first 300 lines of CSV '$ifilename' file to ../import-small/."
+
+head -n 301 "$ifilename" > "$ofilename"
+
+echo ""
Index: /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/03-COPY-SPREADSHEET-TO-IMPORT.sh
===================================================================
--- /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/03-COPY-SPREADSHEET-TO-IMPORT.sh	(revision 37222)
+++ /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/03-COPY-SPREADSHEET-TO-IMPORT.sh	(revision 37222)
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+/bin/cp "HMS\ Catalogue.xlsx\ -\ Table.csv" ../import/.
Index: /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/04-RCLONE-SYNC--InterMusE_Images.sh
===================================================================
--- /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/04-RCLONE-SYNC--InterMusE_Images.sh	(revision 37222)
+++ /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/04-RCLONE-SYNC--InterMusE_Images.sh	(revision 37222)
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+#rclone sync -i "gdrive-davidb:research/projects/InterMusE-project.lnk/Digitised materials ready for digital archive/InterMusE_Images" InterMusE_Images
+
+for n in 1 2 3 4 5 6 7 8 9 \
+	   10 11 12 13 14 15 16 17 18 19 \
+	   20 21 22 23 24 25 26 27 28 29 ; do
+    echo "----"
+    echo "Rclone sync HMS_$n"
+    echo "----"
+    rclone sync "gdrive-davidb:research/projects/InterMusE-project.lnk/Digitised materials ready for digital archive/InterMusE_Images/HMS_$n" InterMusE_Images/HMS_$n
+
+done
Index: /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/05-ARCHIVE-TO-ITEM.sh
===================================================================
--- /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/05-ARCHIVE-TO-ITEM.sh	(revision 37222)
+++ /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/05-ARCHIVE-TO-ITEM.sh	(revision 37222)
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+# HMS_1/HMS_1.pdf
+
+if [ ! -d Items ] ; then
+    echo ""
+    echo "Creating directory: Items"
+    echo ""
+    mkdir Items
+fi
+
+#for full_archive_dir in Archive/HMS_*[0-9] Archives/BMS_[0-9]_[0-9]_*[0-9] ; do
+#for full_archive_dir in Archive/* ; do
+for full_archive_dir in InterMusE_Images/* ; do
+    
+    echo "Processing $full_archive_dir"
+    archive_dir=${full_archive_dir##*/}
+    vol=${archive_dir#*_}
+    
+    full_item_dir=GS_Items/${archive_dir}
+    item_dir=${archive_dir}
+    
+    /bin/rm -rf $full_item_dir
+    mkdir $full_item_dir
+    #mkdir $full_item_dir/TIFFs
+    mkdir $full_item_dir/JPEGs
+
+    full_item_filename=$full_item_dir/$archive_dir.item
+
+    echo ""
+    echo "Generating $full_item_filename"
+    echo ""
+   
+    echo "<Volume>$vol" > $full_item_filename
+    
+    #images=$(cd $full_archive_dir/TIFFs && ls ${archive_dir}_[0-9][0-9][0-9][0-9].tif)
+    #images=$(cd $full_archive_dir/JPEGs && ls ${archive_dir}_[0-9][0-9][0-9][0-9].jpg)
+    images=$(cd $full_archive_dir/JPEGs && ls ${archive_dir}_*[0-9].jpg)    
+
+    echo "  Appending/Copying Images"
+    for image in $images ; do
+	page_num_with_ext=${image#_}
+	#page_num=${page_num_with_ext%.tif}
+	page_num=${page_num_with_ext%.jpg}
+	
+	#echo "    $full_archive_dir/TIFFs/$image -> $full_item_dir/TIFFs/$image"
+	#/bin/cp $full_archive_dir/TIFFs/$image $full_item_dir/TIFFs/$image
+	echo "    $full_archive_dir/JPEGs/$image -> $full_item_dir/JPEGs/$image"
+	/bin/cp $full_archive_dir/JPEGs/$image $full_item_dir/JPEGs/$image
+
+	# Only image, no ocr'd txt file
+	#echo "$page_num:TIFFs/$image:" >> $full_item_filename
+	echo "$page_num:JPEGs/$image:" >> $full_item_filename
+    done
+
+    
+
+done
+
+echo ""
+
+
Index: /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/06-COPY-TO-IMPORT.sh
===================================================================
--- /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/06-COPY-TO-IMPORT.sh	(revision 37222)
+++ /gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/06-COPY-TO-IMPORT.sh	(revision 37222)
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+echo 'Copying GS_Items/*_*[0-9] directories to ../import'
+
+#for full_d in Items/HMS_* ; do
+for full_d in GS_Items/*_*[0-9] ; do
+    d=${full_d##*/}
+    if [ -d ../import/$d ] ; then
+	echo "  Removing pre-existing ../import/$d"
+	/bin/rm -r ../import/$d
+    fi
+
+    #echo "  Copying $d"
+    #/bin/cp -r $full_d ../import/.
+
+    # Example of recursive copy that uses hardlinks for files
+    # rsync -av --link-dest="$PWD/a" a/ b
+    #
+    # For more details see (down near the bottom)
+    #   https://unix.stackexchange.com/questions/202430/how-to-copy-a-directory-recursively-using-hardlinks-for-each-file
+
+    echo "  Hardlink file recursive copying $d"
+    rsync -av --link-dest="$PWD/$full_d" $full_d/ ../import/$d
+
+
+done
+
