From 4f5f0f76be27e7326fb836f22895f6e1e1adfb11 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 19 Jun 2018 10:01:15 -0400 Subject: [PATCH] Small adjustments for csv export --- export.py | 4 ++-- templates/downloads.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/export.py b/export.py index 1479034..55b07f7 100644 --- a/export.py +++ b/export.py @@ -12,7 +12,7 @@ def export(outfile="out.csv"): docs = es.stream_all_docs() docs_with_website = db.join_website_on_scan(docs) - print("Connected") + print("Connected, writing to csv") with open(outfile + ".temp", "w") as out: @@ -29,7 +29,7 @@ def export(outfile="out.csv"): doc["_source"]["mtime"]]) print("Wrote to csv, compressing with xz") - os.system("xz " + outfile + ".temp") + os.system("xz -0 " + outfile + ".temp") os.system("mv " + outfile + ".temp.xz " + outfile + ".xz") print("Compressed to " + str(os.path.getsize(outfile + ".xz")) + " bytes") diff --git a/templates/downloads.html b/templates/downloads.html index 49c5f59..c4b5ce8 100644 --- a/templates/downloads.html +++ b/templates/downloads.html @@ -8,7 +8,7 @@
Downloads
-

The entire database is exported to CSV every ±30min

+

The entire database is exported to CSV regularly

@@ -25,7 +25,7 @@ - + {% endif %}
out.csv.xz {{ export_file_stats.st_size |filesizeformat }}{{ export_file_stats.st_mtime|date_format }}{{ export_file_stats.st_mtime|datetime_format }}