publish.py 506 B

12345678910111213141516171819
  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. run(('scp', '-r', dir_name, remote))
  13. print(f'Data available at https://eg.fangmeier.tech/{dir_name}/')