-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactionitems.py
More file actions
46 lines (34 loc) · 990 Bytes
/
actionitems.py
File metadata and controls
46 lines (34 loc) · 990 Bytes
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
import sys
def printUsage():
msg = '''
Action Items:
Takes in a Ryan Format txt file. Spits out Actionable Items and Items marked for follow up query.
Usage:
./actionitems.py [notesfilename]
'''
print msg
def main(argv=None):
if argv is None:
argv = sys.argv
if len(argv) < 2:
print 'No filename specified!'
printUsage()
sys.exit(1)
filename = argv[1]
file = open(filename)
actionItems = []
queryItems = []
for line in file:
if line.find('A:') != -1:
actionItems.append(line)
if line.find('Q:') != -1:
queryItems.append(line)
print 'Found %s Action Items:' % len(actionItems)
for item in actionItems:
print '\t %s' % item.strip()
print '========================'
print 'Found %s Query Items:' % len(queryItems)
for item in queryItems:
print '\t %s' % item.strip()
if __name__ == "__main__":
main()