Changeset 36998


Ignore:
Timestamp:
2022-12-09T00:11:00+13:00 (18 months ago)
Author:
davidb
Message:

Tweaks after testing

Location:
gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes/prepare
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes/prepare/01-ARCHIVE-TO-ITEM.sh

    r36992 r36998  
    33# HMS_1/HMS_1.pdf
    44
     5if [ ! -d Items ] ; then
     6    echo ""
     7    echo "Creating directory: Items"
     8    echo ""
     9    mkdir Items
     10fi
    511
    6 for archive_dir in HMS_*[0-9] ; do
    7     echo "Processing $archive_dir"
     12for full_archive_dir in Archive/HMS_*[0-9] ; do
     13    echo "Processing $full_archive_dir"
     14    archive_dir=${full_archive_dir##*/}
    815    vol=${archive_dir#*_}
    916   
    10     item_dir=${archive_dir}_item
     17    full_item_dir=Items/${archive_dir}
     18    item_dir=${archive_dir}
    1119   
    12     /bin/rm -rf $item_dir
    13     mkdir $item_dir
    14     #mkdir $item_dir/TIFFs
    15     mkdir $item_dir/JPEGs
     20    /bin/rm -rf $full_item_dir
     21    mkdir $full_item_dir
     22    #mkdir $full_item_dir/TIFFs
     23    mkdir $full_item_dir/JPEGs
     24
     25    full_item_filename=$full_item_dir/$archive_dir.item
    1626
    1727    echo ""
    18     echo "Generating $item_filename"
     28    echo "Generating $full_item_filename"
    1929    echo ""
    20 
    21     item_filename=$item_dir/$archive_dir.item
    2230   
    23     echo "<Volume>$vol" > $item_filename
    24 
     31    echo "<Volume>$vol" > $full_item_filename
    2532   
    26     #images=$(cd $archive_dir/TIFFs && ls ${archive_dir}_[0-9][0-9][0-9][0-9].tif)
    27     images=$(cd $archive_dir/JPEGs && ls ${archive_dir}_[0-9][0-9][0-9][0-9].jpg)
     33    #images=$(cd $full_archive_dir/TIFFs && ls ${archive_dir}_[0-9][0-9][0-9][0-9].tif)
     34    images=$(cd $full_archive_dir/JPEGs && ls ${archive_dir}_[0-9][0-9][0-9][0-9].jpg)
    2835
    2936    echo "  Appending/Copying Images"
     
    3340    page_num=${page_num_with_ext%.jpg}
    3441   
    35     #echo "    $archive_dir/TIFFs/$image -> $item_dir/TIFFs/$image"
    36     #/bin/cp $archive_dir/TIFFs/$image $item_dir/TIFFs/$image
    37     echo "    $archive_dir/JPEGs/$image -> $item_dir/JPEGs/$image"
    38     /bin/cp $archive_dir/JPEGs/$image $item_dir/JPEGs/$image
     42    #echo "    $full_archive_dir/TIFFs/$image -> $full_item_dir/TIFFs/$image"
     43    #/bin/cp $full_archive_dir/TIFFs/$image $full_item_dir/TIFFs/$image
     44    echo "    $full_archive_dir/JPEGs/$image -> $full_item_dir/JPEGs/$image"
     45    /bin/cp $full_archive_dir/JPEGs/$image $full_item_dir/JPEGs/$image
    3946
    4047    # Only image, no ocr'd txt file
    41     #echo "$page_num:TIFFs/$image:" >> $item_filename
    42     echo "$page_num:JPEGs/$image:" >> $item_filename
     48    #echo "$page_num:TIFFs/$image:" >> $full_item_filename
     49    echo "$page_num:JPEGs/$image:" >> $full_item_filename
    4350    done
    4451
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes/prepare/02-COPY-TO-IMPORT.sh

    r36992 r36998  
    11#!/bin/bash
    22
    3 echo "Copying HMS_*_item directories to ../import"
     3echo "Copying Items/HMS_* directories to ../import"
    44
    5 for d in HMS_*_item ; do
     5for full_d in Items/HMS_* ; do
     6    d=${full_d##*/}
    67    if [ -d ../import/$d ] ; then
    78    echo "  Removing pre-existing ../import/$d"
     
    1011
    1112    echo "  Copying $d"
    12     /bin/cp -r $d ../import/.
     13    /bin/cp -r $full_d ../import/.
    1314done
    1415
Note: See TracChangeset for help on using the changeset viewer.