-
Notifications
You must be signed in to change notification settings - Fork 0
/
check_files.py
44 lines (40 loc) · 1.03 KB
/
check_files.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
import os
import sys
import time
import datetime
import codecs
from subprocess import check_output
####################################################################################################
# Version 1.01
#
# review script designed to check each file in a data set, and open the files in gedit if they have
# not already been reviewed.
#
# Functions: N/A
#
#
# INVOKING INSTRUCTIONS:
# python check_files.py sets/<filename>.txt
#
#
# Updates from Version 1.00:
# -Documentation
####################################################################################################
if __name__ == "__main__":
if (len(sys.argv)!=2):
print("usage: {0} <count>".format(sys.argv[0]))
sys.exit(1)
# start = time.clock()
x_file = open(str(sys.argv[1]),'r')
print ("Exploring: ", x_file)
# initSize=0
log=open("reviewed.txt",'r+')
for line in x_file:
if line in log:
pass
else:
log.write(line)
os.system("gedit "+line.strip())
print("All Files Reviewed")
x_file.close()
log.close()