diff options
Diffstat (limited to 'wqflask')
-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]) |