diff options
author | zsloan | 2022-05-10 19:22:43 +0000 |
---|---|---|
committer | zsloan | 2022-05-10 19:39:27 +0000 |
commit | 3442637687ac5ea38318e48997bc1be736c787ea (patch) | |
tree | 52c251471dc175e496848bf8f8f9c30a49195d01 | |
parent | c24fd5b3d18ac663efe2944f1fab0355fea2eee5 (diff) | |
download | genenetwork2-3442637687ac5ea38318e48997bc1be736c787ea.tar.gz |
Add metadata to collection export file
-rw-r--r-- | wqflask/wqflask/export_traits.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/wqflask/wqflask/export_traits.py b/wqflask/wqflask/export_traits.py index 7fab1e10..0c80e9a4 100644 --- a/wqflask/wqflask/export_traits.py +++ b/wqflask/wqflask/export_traits.py @@ -29,6 +29,19 @@ def export_collection(targs): buff = io.StringIO() writer = csv.writer(buff) + + now = datetime.datetime.now() + time_str = now.strftime('%H:%M (UTC) %m/%d/%y') + + metadata_rows = [ + ["# Collection Name: " + targs['collection_name_export']], + ["# User E-mail: " + targs['user_email_export']], + ["# Time/Date: " + time_str] + ] + + for row in metadata_rows: + writer.writerow(row) + for trait in table_rows: writer.writerow([trait]) |