Changeset 35990 for main/trunk


Ignore:
Timestamp:
2022-01-11T21:16:22+13:00 (2 years ago)
Author:
davidb
Message:

Changes after testing

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/08b-COPY-CSV-AND-AUDIO-FEATURES-TO-IMPORT.sh

    r35989 r35990  
    44# prep_dir=essentia-audio-features
    55
    6 python3 -u ./08b-COPY-CSV-AUDIO-FEATURES-TO-IMPORT_support.py $*
     6python3 -u ./08b-COPY-CSV-AND-AUDIO-FEATURES-TO-IMPORT_support.py $*
    77
    88
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/08b-COPY-CSV-AND-AUDIO-FEATURES-TO-IMPORT_support.py

    r35985 r35990  
    225225
    226226          print("  Copying: " + src_json_file + " => " + dst_json_file)
    227 #          shutil.copy(src_json_file,dst_json_file)
     227          shutil.copy(src_json_file,dst_json_file)
    228228
    229229          print("  Copying: " + src_json_file + " => " + dst_assoc_json_file)
    230 #          shutil.copy(src_json_file,dst_assoc_json_file)
     230          shutil.copy(src_json_file,dst_assoc_json_file)
    231231                   
    232232
    233233# Sort out contestant CSV files to copy into ../import area
    234234
    235 src_csv_filenames = []
     235src_csv_files = []
    236236
    237237if start_year is None and end_year is None:
     
    240240     #esc_cutoff_endyear = 2021
    241241     
    242      src_csv_filenames.append("contestants-1956.cvs")
    243      src_csv_filenames.append(f"contestants-1957-to-{esc_cutoff_endyear}.cvs")
     242     src_csv_files.append("contestants-1956.cvs")
     243     src_csv_files.append(f"contestants-1957-to-{esc_cutoff_endyear}.cvs")
    244244     
    245245elif start_year is None :
    246      src_csv_filenames.append(f"contestants-1956-to-{end_year}.cvs")
     246     src_csv_files.append(f"contestants-1956-to-{end_year}.cvs")
    247247
    248248elif end_year is None :
    249      src_csv_filenames.append(f"contestants-{start_year}-to-{esc_cutoff_endyear}.cvs")
     249     src_csv_files.append(f"contestants-{start_year}-to-{esc_cutoff_endyear}.cvs")
    250250else:
    251      src_csv_filenames.append(f"contestants-{start_year}-to-{end_year}.cvs")
     251     src_csv_files.append(f"contestants-{start_year}-to-{end_year}.cvs")
    252252
    253253
    254254dst_csv_dirs = [os.path.join(import_dir,"inaugural-year"), os.path.join(import_dir,"missing-cat-countries") ]
    255255
    256 
    257256sparql_result_dirs = glob(os.path.join(import_dir,"sparqlresults-local--countries-in-esc-by-year-*/"))
    258 
    259257dst_csv_dirs += sparql_result_dirs
    260258
    261 print("****** src_csv_filename = " + repr(src_csv_filenames))
    262 
    263 print("****** dst_csv_dirs = " + repr(dst_csv_dirs))
    264 
    265 
    266 # cp contestants-2015.csv ../../import/sparqlresults-local--countries-in-esc-by-year-just-2015--with-errata/metadata-contestants-2015.csv
     259
     260print()
     261print("Copying the following Contestants CSV files into 'import'")
     262
     263for dst_dir in dst_csv_dirs:
     264     for src_csv_file in src_csv_files:
     265
     266          src_csv_filename = os.path.join(prep_dir,src_csv_file)
     267          dst_csv_filename = os.path.join(dst_dir,src_csv_file)
     268         
     269          print("  Copying: " + src_csv_filename + " => " + dst_csv_filename)
     270          shutil.copy(src_csv_filename,dst_filename)
     271
     272
Note: See TracChangeset for help on using the changeset viewer.