From 791eb3ee3f0e3e9d5ba1225eb6feed41915e035b Mon Sep 17 00:00:00 2001 From: Niclas Dobbertin Date: Wed, 4 Oct 2023 12:34:02 +0200 Subject: change LogParser to unix line endings --- bjoern/videoanalyse/LogParser.py | 280 +++++++++++++++++++-------------------- 1 file changed, 140 insertions(+), 140 deletions(-) (limited to 'bjoern/videoanalyse/LogParser.py') diff --git a/bjoern/videoanalyse/LogParser.py b/bjoern/videoanalyse/LogParser.py index 1104e7f..c314de7 100755 --- a/bjoern/videoanalyse/LogParser.py +++ b/bjoern/videoanalyse/LogParser.py @@ -1,140 +1,140 @@ -# -*- coding: utf-8 -*- -""" -This script takes multiple .log data files from PCScreenWatcher and a Firefox history database (places.sqlite) -inside a folder to extract each activity title, their url if applicable and usage timestamps into a pseudo-csv file. -""" - -import os -import re -from datetime import datetime -import csv -import codecs -from read_sqlite import get_url_from_sqlite -from pathlib import Path - - -# takes the log data string and returns a list of activity titles and their time windows -def extract_activities(log_data): - BROWSER_TITLE_SUFFIX = " - Mozilla Firefox" - # regex which matches between squared brackets - reg_titles = re.compile("(?<=\[).*?(?=\])") - # regex for total/active time - reg_time = re.compile( - "(?