From 8bce8e05bc37753606ebe45ab25b7e423348c032 Mon Sep 17 00:00:00 2001 From: streetRAT Date: Thu, 20 Oct 2022 16:24:50 +0200 Subject: [PATCH] added scripts to help setup first time --- results/first_time.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/results/first_time.py b/results/first_time.py index b37c1d7..43dc49b 100644 --- a/results/first_time.py +++ b/results/first_time.py @@ -1,5 +1,20 @@ import datetime +import json format_data = "%Y-%m-%d %H:%M:%S.%f" time = datetime.datetime.now().strftime(format_data) print(time) + +f = open("..\\video_creation\\data\\videos.json") + +# loads videos.json into a dictionary +video_data = json.load(f) + +for video in video_data: + video["uploaded"] = False + +# serialises the dictionary to json +json_obj = json.dumps(video_data, indent=4, default=str) +# writes the file +with open("..\\video_creation\\data\\videos.json", "w") as outfile: + outfile.write(json_obj)