completed startpage
This commit is contained in:
+7
-2
@@ -60,8 +60,11 @@ class exporter:
|
||||
f.close()
|
||||
|
||||
def export_startpage(self, seller_listings_count, cheaper_listings_count, compare_time, date):
|
||||
duration_export = datetime.timestamp(self.tsStart)
|
||||
print("Comparison needed: ", duration_export)
|
||||
|
||||
duration_export = datetime.now() - self.tsStart
|
||||
hours, remainder = divmod(duration_export.total_seconds(), 3600)
|
||||
minutes, seconds = divmod(remainder, 60)
|
||||
duration_export = str(hours) +"h " + str(minutes) + "m " + str(round(seconds, 2)) + "s"
|
||||
|
||||
f = open(os.path.join(self.export_dir, "index.html"), "a")
|
||||
f.write(thtml.html_startpage_head())
|
||||
@@ -102,5 +105,7 @@ if __name__ == "__main__":
|
||||
exp = exporter("./html_out/")
|
||||
exp.export_comparison(seller_listing_dummy, competitor_listings_dummy)
|
||||
|
||||
exp.export_startpage(10, 2, 0, "d")
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user