summaryrefslogtreecommitdiff
path: root/bjoern
diff options
context:
space:
mode:
authorNiclas Dobbertin <niclas.dobbertin@stud.tu-darmstadt.de>2023-08-02 14:26:10 +0200
committerNiclas Dobbertin <niclas.dobbertin@stud.tu-darmstadt.de>2023-08-02 14:26:10 +0200
commit844053793d21229fa4baa61772f571c8622613c5 (patch)
tree128df628bb93273f46e1360e87ac318eb9e6b1b5 /bjoern
parent4d9c0dce1f5bc0bd3cde1b89875387f1a13c18c4 (diff)
remove user input
Diffstat (limited to 'bjoern')
-rwxr-xr-xbjoern/videoanalyse/LogParser.py33
1 files changed, 14 insertions, 19 deletions
diff --git a/bjoern/videoanalyse/LogParser.py b/bjoern/videoanalyse/LogParser.py
index 703ffa2..448b283 100755
--- a/bjoern/videoanalyse/LogParser.py
+++ b/bjoern/videoanalyse/LogParser.py
@@ -112,25 +112,20 @@ def generate_log(activities: dict):
return(log)
-choice = input(
- "Press 'l' and enter to extract log data. Make sure this script"
- + "file is in the folder containing the VP-subfolders."
-)
-if choice == "l":
- for vp_dir in [f.name for f in os.scandir() if f.is_dir()]:
- print(vp_dir)
- log = extract_activities(get_log_data(vp_dir))
- log = generate_log(log)
-
- history = get_history_db(vp_dir)
- log = match_urls(history, log)
-
- path = Path(f"{vp_dir}/{vp_dir}.csv")
- with open(path, "w") as csvfile:
- writer = csv.writer(csvfile, delimiter=",", quoting=csv.QUOTE_NONNUMERIC)
- writer.writerow(["Starttime", "Endtime", "Title", "URL"])
- for row in log:
- writer.writerow(row)
+for vp_dir in [f.name for f in os.scandir() if f.is_dir()]:
+ print(vp_dir)
+ log = extract_activities(get_log_data(vp_dir))
+ log = generate_log(log)
+
+ history = get_history_db(vp_dir)
+ log = match_urls(history, log)
+
+ path = Path(f"{vp_dir}/{vp_dir}.csv")
+ with open(path, "w") as csvfile:
+ writer = csv.writer(csvfile, delimiter=",", quoting=csv.QUOTE_NONNUMERIC)
+ writer.writerow(["Starttime", "Endtime", "Title", "URL"])
+ for row in log:
+ writer.writerow(row)
input("*Press enter to close*")