@@ -301,6 +301,26 @@ def copy_static_cc_legal_tools_files(self):
301
301
os .path .join (destination , file_name ),
302
302
)
303
303
304
+ def copy_static_rdf_files (self ):
305
+ hostname = socket .gethostname ()
306
+ output_dir = self .output_dir
307
+ LOG .info ("Copying static rdf files" )
308
+ LOG .debug (f"{ hostname } :{ output_dir } " )
309
+ path = "rdf"
310
+ source = os .path .join (
311
+ settings .PROJECT_ROOT ,
312
+ "cc_legal_tools" ,
313
+ "static" ,
314
+ path ,
315
+ )
316
+ destination = os .path .join (output_dir , path )
317
+ os .makedirs (destination , exist_ok = True )
318
+ for file_name in os .listdir (source ):
319
+ copyfile (
320
+ os .path .join (source , file_name ),
321
+ os .path .join (destination , file_name ),
322
+ )
323
+
304
324
def write_rdf_meta (self ):
305
325
"""
306
326
Generate the index.rdf, images.rdf and copies the rest.
@@ -326,6 +346,9 @@ def write_rdf_meta(self):
326
346
# Write and Copy RDF/XML meta files
327
347
if meta_file in ["jurisdictions.rdf" , "selectors.rdf" ]:
328
348
continue
349
+ elif meta_file in ["schema.rdf" ]:
350
+ # see copy_static_rdf_files()
351
+ pass
329
352
elif meta_file in ["index.rdf" , "images.rdf" ]:
330
353
LOG .info (f"Writing { meta_file } " )
331
354
save_images_and_index_rdf (dest_dir , meta_file )
@@ -549,6 +572,7 @@ def distill_and_copy(self):
549
572
self .write_robots_txt ()
550
573
self .copy_static_wp_content_files ()
551
574
self .copy_static_cc_legal_tools_files ()
575
+ self .copy_static_rdf_files ()
552
576
self .write_rdf_meta ()
553
577
self .copy_legal_code_plaintext ()
554
578
self .write_dev_index ()
0 commit comments