-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
36 lines (32 loc) · 891 Bytes
/
Copy pathmain.py
File metadata and controls
36 lines (32 loc) · 891 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
'''
This downloads, and preprocesses scripts from the open movie script database.
written by: Dominik Kaukinen
'''
from downloader import *
import sys
import shutil
from utility import *
def main():
for arg in sys.argv:
if arg == "clean":
shutil.rmtree('data')
print "Removed temporary and data files, re-run to re-download..."
return
d = Downloader()
d.download()
if(deleteSmallFiles()):
#TODO run preprocessor
else:
terminalContinue()
def terminalContinue():
x = raw_input("Some failed downloads couldn't be deleted. Run preprocessor anyways? (y/n)")
x = x.lower()
if x == "y" or x == "yes":
return True
elif x == "n" or x == "no":
return False
else:
print "Not valid respone\n"
return terminalContinue()
if __name__=="__main__":
main()