source: tmcsimulator/trunk/bin/postsession_logmerge.bash @ 674

Revision 674, 990 bytes checked in by jdalbey, 4 years ago (diff)

Add resetlogs_dev.sh postsession_logmerge.bash

  • Property svn:executable set to *
Line 
1# Merge log files and sort by timestamp
2# Invoke from 'bin' folder
3# TODO: Add error handling - missing files, not executed from 'webapps', ...
4
5# Change to trunk folder
6cd ..   
7
8# 1. Runs a python program named "extract_caddetails"
9# to extract CAD DETAIL lines from incident_script.xml
10# and creates an output file "caddetails.csv"
11
12PYTHONPATH=webapps/unifiedlogger.zip  python -m extract_caddetails
13
14# 2. Define a variable for the directory containing the data files
15dir="webapps/dynamicdata"
16
17# 3. Merge three files: unified log, cad details, LCSlogfile, and evaluation ratings
18# then sort them by timestamp (reverse chronological). 
19# Final result placed in "sessionlog.csv"
20cat $dir/unifiedlog.csv $dir/caddetails.csv $dir/evalratings.csv $dir/LCSlogfile.txt | sort > $dir/sessionlog.csv
21
22# 4. Next, launch the webserver and browse to localhost:8080/sessionlogdisplay.html
23#    to show a nicely formatted version of the results.
24firefox localhost:8080/sessionlogdisplay.html  &
Note: See TracBrowser for help on using the repository browser.