- Timestamp:
- 2022-01-11T21:16:22+13:00 (2 years ago)
- 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 4 4 # prep_dir=essentia-audio-features 5 5 6 python3 -u ./08b-COPY-CSV-A UDIO-FEATURES-TO-IMPORT_support.py $*6 python3 -u ./08b-COPY-CSV-AND-AUDIO-FEATURES-TO-IMPORT_support.py $* 7 7 8 8 -
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/08b-COPY-CSV-AND-AUDIO-FEATURES-TO-IMPORT_support.py
r35985 r35990 225 225 226 226 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) 228 228 229 229 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) 231 231 232 232 233 233 # Sort out contestant CSV files to copy into ../import area 234 234 235 src_csv_file names = []235 src_csv_files = [] 236 236 237 237 if start_year is None and end_year is None: … … 240 240 #esc_cutoff_endyear = 2021 241 241 242 src_csv_file names.append("contestants-1956.cvs")243 src_csv_file names.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") 244 244 245 245 elif start_year is None : 246 src_csv_file names.append(f"contestants-1956-to-{end_year}.cvs")246 src_csv_files.append(f"contestants-1956-to-{end_year}.cvs") 247 247 248 248 elif end_year is None : 249 src_csv_file names.append(f"contestants-{start_year}-to-{esc_cutoff_endyear}.cvs")249 src_csv_files.append(f"contestants-{start_year}-to-{esc_cutoff_endyear}.cvs") 250 250 else: 251 src_csv_file names.append(f"contestants-{start_year}-to-{end_year}.cvs")251 src_csv_files.append(f"contestants-{start_year}-to-{end_year}.cvs") 252 252 253 253 254 254 dst_csv_dirs = [os.path.join(import_dir,"inaugural-year"), os.path.join(import_dir,"missing-cat-countries") ] 255 255 256 257 256 sparql_result_dirs = glob(os.path.join(import_dir,"sparqlresults-local--countries-in-esc-by-year-*/")) 258 259 257 dst_csv_dirs += sparql_result_dirs 260 258 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 260 print() 261 print("Copying the following Contestants CSV files into 'import'") 262 263 for 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.