Mercurial > hg > webaudioevaluationtool
comparison scripts/timeline_view.py @ 264:4345ba8a1b6e
Scripts: choose input/output folder from command line; score_plot also choose options from command line (WIP)
author | Brecht De Man <b.deman@qmul.ac.uk> |
---|---|
date | Mon, 20 Jul 2015 12:47:16 +0100 |
parents | c3f29c2b9b12 |
children | a1c1f032ff0a |
comparison
equal
deleted
inserted
replaced
263:ef2d63555702 | 264:4345ba8a1b6e |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 import xml.etree.ElementTree as ET | 3 import xml.etree.ElementTree as ET |
4 import os | 4 import os # list files in directory |
5 import matplotlib.pyplot as plt | 5 import sys # command line arguments |
6 import matplotlib.pyplot as plt # plots | |
7 | |
8 # COMMAND LINE ARGUMENTS | |
9 | |
10 assert len(sys.argv)<3, "timeline_view takes at most 1 command line argument\n"+\ | |
11 "Use: python timeline_view.py [timeline_folder_location]" | |
12 | |
13 # XML results files location | |
14 if len(sys.argv) == 1: | |
15 folder_name = "../saves" # Looks in 'saves/' folder from 'scripts/' folder | |
16 print "Use: python timeline_view.py [timeline_folder_location]" | |
17 print "Using default path: " + folder_name | |
18 elif len(sys.argv) == 2: | |
19 folder_name = sys.argv[1] # First command line argument is folder | |
6 | 20 |
7 # CONFIGURATION | 21 # CONFIGURATION |
8 | |
9 # XML results files location (modify as needed): | |
10 folder_name = "../saves" # Looks in 'saves/' folder from 'scripts/' folder | |
11 | 22 |
12 # Folder where to store timelines | 23 # Folder where to store timelines |
13 timeline_folder = folder_name + '/timelines/' # Stores in 'saves/timelines/' | 24 timeline_folder = folder_name + '/timelines/' # Stores in 'saves/timelines/' |
14 | 25 |
15 # Font settings | 26 # Font settings |