aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2022-05-10 19:22:43 +0000
committerzsloan2022-05-10 19:39:27 +0000
commit3442637687ac5ea38318e48997bc1be736c787ea (patch)
tree52c251471dc175e496848bf8f8f9c30a49195d01 /wqflask
parentc24fd5b3d18ac663efe2944f1fab0355fea2eee5 (diff)
downloadgenenetwork2-3442637687ac5ea38318e48997bc1be736c787ea.tar.gz
Add metadata to collection export file
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/export_traits.py13
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])