-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlistruns.py
executable file
·63 lines (49 loc) · 1.26 KB
/
listruns.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/python
import os
from lxml import etree
import runsarr
import sys
runs = runsarr.runsarr()
runs.sort(lambda x, y: cmp(x[2],y[2]))
args = sys.argv[1:]
narg=len(args)
for run in runs:
s_project=run[0]
s_tstamp=run[1]
s_index=run[2]
s_description=run[3]
s_path=run[4]
s_status=run[5]
s_importance=run[6]
s_notes=run[7]
printrun = 0
if narg == 0:
printrun = 1
if "-n" in args:
if narg ==1:
printrun = 1
if "-s" in args:
if s_status in args:
printrun = 1
if "-p" in args:
if s_project in args:
printrun = 1
if "-i" in args:
if s_importance in args:
printrun = 1
if ("-p" in args) and ("-i" in args):
printrun=0
if s_project in args and s_importance in args:
printrun = 1
if printrun:
print "***************************"
print "PROJECT:",s_project
print "TSTAMP:",s_tstamp
print "INDEX:",s_index
print "DESCRIPTION:", s_description
print "PATH:", s_path
print "STATUS:", s_status
print "IMPORTANCE:", s_importance
if "-n" in args:
print "NOTES:", s_notes
print "***************************\n"