Iterate through all found Journal files using the First and Last line timestamps as time deltas to add to a running total.DONERather than using the First line of each file, look for a "Location" event.DONERather than blindly using the Last line of a file, look for "Shutdown" events. NB: There may be others, as in returning to the main menu, in which case we'd then need to look for a new "Location" event again.DONEHandle the (rare?) case of a session's Journal file filling and spilling over into aDONE01
or greater version. This will also entail some state to handle a session spanning files, remembering there might not be a Shutdown/MainMenu event, so finding a Location event soon in the next file means "use the last event in the previous file as this time delta's end".
Output the found data to a CSV file (in the Journals location).DONEUse "Location" event as the start time.DONEUse "Shutdown", "Music" ("MusicTrack":"MainMenu") to detect end of session.DONEIf we reach end of file, treat that as end of a session if we didn't yet see one.DONEIf we find a 'logout' event, start looking for a new 'login' event.DONEIf we reach the end of aNN
Journal check if the next isNN+1
for the same Journal file name timestamp.This will need some state machine. If the new file finds a new 'login' event before a 'logout' one then we need to decide what the end of the prior session was. At the least we need to store the 'last line' timestamp from the prior file.DONE
- Try to figure out how to have Google Sheets aggregate the data per day, and include any 'empty' days in the chart.