-
Notifications
You must be signed in to change notification settings - Fork 9
/
__main__.py
42 lines (33 loc) · 892 Bytes
/
__main__.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
import sys
import os
import subprocess
def main(start_time, end_time):
print("Processing Tweets")
processor = subprocess.Popen([
sys.executable,
'tweet_processor.py',
start_time,
end_time])
processor.wait()
print("Finished processing Tweets")
print("Analysing Tweets")
analyser = subprocess.Popen([
sys.executable,
'tweet_sentiment.py',
start_time,
end_time])
analyser.wait()
print("Finished analysing Tweets")
print("Graphing Tweets")
grapher = subprocess.Popen([
sys.executable,
'grapher.py',
start_time,
end_time])
grapher.wait()
print("Finished graphing Tweets")
if __name__ == '__main__':
if (len(sys.argv) != 3):
print ("ERROR: Usage __main__.py <start date> <end date>")
else:
main(sys.argv[1], sys.argv[2])