-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcopy_to_html_dir.py
31 lines (23 loc) · 1.04 KB
/
copy_to_html_dir.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
from datetime import datetime
#Edit this string to point to your output dir
web_folder = '~/public_html/'
input_folder = '../'
today = datetime.now()
#Production_title = 'Production_'+today.strftime("%b_%d_%Y_%H%M%S")
Production_title = 'Production_'+today.strftime("%b_%d_%Y")
output_location = web_folder + Production_title
Regions = ['Zmumu', 'Zee', 'Wmunu', 'Wenu', 'SR']
Categories = ['MTR', 'VTR']
Eras = ['2017', '2018']
print('Processin location: ' + input_folder)
print('-- Copying files to :' + output_location)
os.system('mkdir ' + output_location)
os.system('cp index.php ' + output_location)
for era in Eras:
for category in Categories:
os.system('mkdir '+output_location+'/'+category+'_'+era)
os.system('cp -r '+input_folder+'test_VBF_'+era+'_'+category+'_testing/Plots/* '+ output_location+'/'+category+'_'+era+'/')
os.system('cp index.php '+output_location+'/'+category+'_'+era+'/')
for region in Regions:
os.system('cp index.php '+output_location+'/'+category+'_'+era+'/'+region+'/')