# HG changeset patch # User geert-vandeweyer # Date 1357808978 18000 # Node ID 47070a3859dfadcfafa13b2a058861ca2bbe46d8 # Parent 272bdc723756adfe8c30df25f6c79f0c5e5a7b17 Uploaded diff -r 272bdc723756 -r 47070a3859df DownloadFiles.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DownloadFiles.py Thu Jan 10 04:09:38 2013 -0500 @@ -0,0 +1,62 @@ +#!/usr/bin/env python +#by Geert Vandeweyer. + +#from galaxy import eggs +import sys, os +import os.path +import datetime + +def stop_err(msg): + sys.stderr.write(msg) + sys.exit() + +def __main__(): + htmloutfile = sys.argv[1] + useremail = sys.argv[2] + folder = sys.argv[3] + ftpdirconfig = sys.argv[4] + try: + fout = open(sys.argv[1],'w') + except: + stop_err("Output file cannot be opened for writing.") + + if len(sys.argv) < 5: + stop_err("No datafiles specified!"); + + # write header to outfile + fout.write("
Info: Files written to the '%s' subdirectory in your FTP account
" %(subdir)) + # close file + fout.close + + +if __name__ == "__main__": __main__() +