Changeset 35947 for main


Ignore:
Timestamp:
2022-01-11T10:11:37+13:00 (2 years ago)
Author:
davidb
Message:

Restructuring of how pythong command-line arguments are supplied; note: not thoroughly tested at this stage

Location:
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/07b-GENERATE-ESSENTIA-FEATURES-DATA--SMALL.sh

    r35946 r35947  
    22
    33if [ $# = 0 ] ; then
    4     ./07b-GENERATE-ESSENTIA-FEATURES-DATA.sh "download_audio|compute_audio_features" --start 2015 --end 2015
    5     # ./07b-GENERATE-ESSENTIA-FEATURES-DATA.sh "scrape_contestants|download_audio|compute_audio_features" --start 2015 --end 2015
     4    year=2015
     5else
     6    year=$1
     7fi
    68
    7 else   
    8     ./07b-GENERATE-ESSENTIA-FEATURES-DATA.sh "download_audio|compute_audio_features" $*
    9     # ./07b-GENERATE-ESSENTIA-FEATURES-DATA.sh "scrape_contestants|download_audio|compute_audio_features" $*
    10 fi
     9/bin/rm -f "votes-$year.csv"
     10/bin/rm -f "contestants-$year.csv"
     11
     12./07b-GENERATE-ESSENTIA-FEATURES-DATA.sh "scrape_contestants" --start $year --end $year
     13# ./07b-GENERATE-ESSENTIA-FEATURES-DATA.sh "download_audio|compute_audio_features" --start $year --end $year contestants-$year.csv
     14
     15   
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/07b-GENERATE-ESSENTIA-FEATURES-DATA.sh

    r35946 r35947  
    2222echo "  compute_audio_features : $run_compute"
    2323
    24 echo "Sleeping for 5 seconds, to give time to press ^C to stop"
    25 echo "..."
     24echo ""
     25echo "Sleeping for 5 seconds, to give time to press ^C to stop ..."
    2626sleep 5
    2727echo  "... continuing"
     
    100100    if [ $# = 0 ] ; then
    101101    cd "$prep_dir" \
    102         && python3 ./main.py --start 1956 --end 1956 \
    103         && python3 ./main.py --start 1957 \
     102        && /bin/rm -f "votes-1956.csv" \
     103        && /bin/rm -f "contestants-1956.csv" \
     104        && python3 -u ./main.py --start 1956 --end 1956 \
     105               \
     106        && /bin/rm -f "votes-1957-${esc_cutoff_endyear}.csv" \
     107        && /bin/rm -f "contestants-1957-${esc_cutoff_endyear}.csv" \
     108        && python3 -u ./main.py --start 1957 --end $esc_cutoff_endyear \
     109               \
     110        && /bin/rm -f "votes-1956-${esc_cutoff_endyear}.csv" \
     111        && /bin/rm -f "contestants-1956-${esc_cutoff_endyear}.csv" \
     112        && python3 -u ./main.py --start 1956 --end $esc_cutoff_endyear \
    104113        && cd ..
    105114    else
    106115    cd "$prep_dir" \
    107         && python3 ./main.py $* \
     116        && python3 -u ./main.py $* \
    108117        && cd ..
    109118    fi
     
    111120
    112121if [ $? = 0 ] && [ $run_download = "1" ] ; then
    113     wget --no-check-certificate -nc -O "$prep_dir/contestants.csv" \
    114      https://github.com/Spijkervet/eurovision_dataset/releases/download/2020.0/contestants.csv \
     122    #wget --no-check-certificate -nc -O "$prep_dir/contestants.csv" \
     123    #   https://github.com/Spijkervet/eurovision_dataset/releases/download/2020.0/contestants.csv \
    115124
     125    if [ $# = 0 ] ; then
     126    # append CSV fileanme to $*
     127    set -- "$@" "contestants-1956-${esc_cutoff_endyear}.csv"
     128    fi
     129   
    116130    cd "$prep_dir" \
    117     && python3 ./audio.py $* \
     131    && python3 -u ./audio.py $* \
    118132    && cd ..
    119133fi
    120134
    121135if [ $? = 0 ] && [ $run_compute = "1" ] ; then
     136    if [ $# = 0 ] ; then
     137    # append CSV fileanme to $*
     138    set -- "$@" "contestants-1956-${esc_cutoff_endyear}.csv"
     139    fi
     140   
    122141    cd "$prep_dir" \
    123     && python3 ./audio_features.py $* \
     142    && python3 -u ./audio_features.py $* \
    124143    && cd ..
    125144fi
Note: See TracChangeset for help on using the changeset viewer.