Skip to content

Commit 5c3f2ac

Browse files
committed
get validator working
1 parent 634be75 commit 5c3f2ac

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

validate_uix.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,41 @@
33

44
# bethesda files
55
morrowind_md5 = None
6-
with open("bsa/morrowind.md5", 'r') as content_file:
6+
with open("Manifests/morrowind.manifest", 'r') as content_file:
77
morrowind_md5 = content_file.read()
88

99
tribunal_md5 = None
10-
with open("bsa/tribunal.md5", 'r') as content_file:
10+
with open("Manifests/tribunal.manifest", 'r') as content_file:
1111
tribunal_md5 = content_file.read()
1212

1313
bloodmoon_md5 = None
14-
with open("bsa/bloodmoon.md5", 'r') as content_file:
14+
with open("Manifests/bloodmoon.manifest", 'r') as content_file:
1515
bloodmoon_md5 = content_file.read()
1616

1717

1818
def validate(md5_list):
19-
print "\nComparing md5sum of UIX:R to the contents Bethesda's BSA files."
19+
print("\nComparing md5sum of UIX:R to the contents Bethesda's BSA files.")
2020
beth_counter = 0
2121
for line in md5_list.split('\n'):
2222
if len(line) > 0:
23-
md5, file_name = line.split(" ")
23+
md5, rest = line.split(",", 1)
2424
if md5 in morrowind_md5:
2525
beth_counter += 1
26-
print "Found in Morrowind.bsa", md5, file_name
26+
print("{0},{1},Found in Morrowind.bsa".format(md5, rest))
2727
if md5 in tribunal_md5:
2828
beth_counter += 1
29-
print "Found in Tribunal.bsa", md5, file_name
29+
print("{0},{1},Found in Tribunal.bsa".format(md5, rest))
3030
if md5 in bloodmoon_md5:
3131
beth_counter += 1
32-
print "Found in Bloodmoon.bsa", md5, file_name
32+
print("{0},{1},Found in Bloodmoon.bsa".format(md5, rest))
3333

34-
print "Out of %d files, found %d bethesda files.\n" % (len(md5_list.split('\n'))-1, beth_counter)
34+
print("Out of {0} files, found {1} bethesda files.\n".format(
35+
len(md5_list.split('\n'))-1, beth_counter))
3536

3637

3738
# uixr files
3839
uixr_md5 = None
39-
with open("UIX.manifest", 'r') as content_file:
40+
with open("Manifests/UIXR.manifest", 'r') as content_file:
4041
uix_md5 = content_file.read()
4142
validate(uix_md5)
4243

0 commit comments

Comments
 (0)