Changeset 34428

Show
Ignore:
Timestamp:
04.10.2020 16:56:38 (3 weeks ago)
Author:
davidb
Message:

Adjustment to allow for working with just the 2013-2014 files

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/mars/collect/deam/PREPARE-IMPORT.sh

    r34400 r34428  
    11#!/bin/bash 
    22 
     3fileset=2013-2014 
     4#fileset=2013-2015 
    35 
    4 echo "----" 
    5 echo "Rsyncing mp3 files in prepare/MEMD_audio into import" 
    6 echo "----" 
    7 rsync -pav prepare/MEMD_audio/*.mp3 import/. 
     6echo 
     7echo "****" 
     8echo "* Working with fileset years: $fileset" 
     9echo "****" 
     10echo 
    811 
    9  
    10 #echo "----" 
    11 #echo "Copying CSV metadata into import" 
    12 #echo "----" 
    13 #/bin/cp prepare/metadata/*.csv import/. 
     12if [ $fileset = "2013-2014" ] ; then 
     13    echo "----" 
     14    echo "Rsyncing the 2013 & 2014 mp3 files in prepare/MEMD_audio into import" 
     15    echo "----" 
     16    rsync -pav prepare/MEMD_audio/*.mp3 --exclude=2[0-9][0-9][0-9].mp3 import/. 
     17else 
     18    echo "----" 
     19    echo "Rsyncing all mp3 files in prepare/MEMD_audio into import" 
     20    echo "----" 
     21    rsync -pav prepare/MEMD_audio/*.mp3 import/. 
     22fi 
    1423 
    1524echo "----" 
     
    3241    > "import/metadata_2014.csv" 
    3342 
    34 echo "----" 
    35 echo "Tweaking prepare/metadata/metadata_2015.csv as copied to import" 
    36 echo "----" 
    3743 
    38 cat "prepare/metadata/metadata_2015.csv" \ 
    39     | sed 's/^id,Filename/Identifier,Filename,OrigFilename/' \ 
    40     | sed 's/^\([0-9]*\),/\1,\1.mp3,/g' \ 
    41     > "import/metadata_2015.csv" 
     44if [ $fileset = "2013-2015" ] ; then 
     45    echo "----" 
     46    echo "Tweaking prepare/metadata/metadata_2015.csv as copied to import" 
     47    echo "----" 
     48 
     49    cat "prepare/metadata/metadata_2015.csv" \ 
     50    | sed 's/^id,Filename/Identifier,Filename,OrigFilename/' \ 
     51    | sed 's/^\([0-9]*\),/\1,\1.mp3,/g' \ 
     52    > "import/metadata_2015.csv" 
     53fi