publish.py 922 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. from datetime import datetime as dt
  3. from subprocess import run
  4. # from glob import glob
  5. # dir_name = f'seeding_studies_{dt.strftime(dt.now(), "%Y_%m_%d_%H")}'
  6. # remote = 'caleb@fangmeier.tech:/var/www/eg/'
  7. # run(('rm', '-rf', dir_name))
  8. # run(('mkdir', '-p', dir_name+'/output'))
  9. # for gdir in glob('../hists*'):
  10. # run(('cp', '-r', gdir, dir_name))
  11. # run(('cp', '-r', 'output', dir_name))
  12. #
  13. # run(('scp', '-r', dir_name, remote))
  14. # print(f'Data available at https://eg.fangmeier.tech/{dir_name}/')
  15. data_dir = "../hists/"
  16. par_dir = "dashboard"
  17. dir_name = f'{par_dir}_{dt.strftime(dt.now(), "%Y_%m_%d_%H")}'
  18. remote = f'caleb@fangmeier.tech:/var/www/eg/'
  19. run(('rm', '-rf', dir_name))
  20. # run(('mkdir', '-p', dir_name))
  21. run(('cp', '-r', par_dir, dir_name))
  22. run(('cp', '-r', data_dir, dir_name))
  23. run(('scp', '-r', dir_name, remote))
  24. print(f'Data available at https://eg.fangmeier.tech/{dir_name}/')