|
3 | 3 |
|
4 | 4 | # bethesda files |
5 | 5 | morrowind_md5 = None |
6 | | -with open("bsa/morrowind.md5", 'r') as content_file: |
| 6 | +with open("Manifests/morrowind.manifest", 'r') as content_file: |
7 | 7 | morrowind_md5 = content_file.read() |
8 | 8 |
|
9 | 9 | tribunal_md5 = None |
10 | | -with open("bsa/tribunal.md5", 'r') as content_file: |
| 10 | +with open("Manifests/tribunal.manifest", 'r') as content_file: |
11 | 11 | tribunal_md5 = content_file.read() |
12 | 12 |
|
13 | 13 | bloodmoon_md5 = None |
14 | | -with open("bsa/bloodmoon.md5", 'r') as content_file: |
| 14 | +with open("Manifests/bloodmoon.manifest", 'r') as content_file: |
15 | 15 | bloodmoon_md5 = content_file.read() |
16 | 16 |
|
17 | 17 |
|
18 | 18 | 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.") |
20 | 20 | beth_counter = 0 |
21 | 21 | for line in md5_list.split('\n'): |
22 | 22 | if len(line) > 0: |
23 | | - md5, file_name = line.split(" ") |
| 23 | + md5, rest = line.split(",", 1) |
24 | 24 | if md5 in morrowind_md5: |
25 | 25 | beth_counter += 1 |
26 | | - print "Found in Morrowind.bsa", md5, file_name |
| 26 | + print("{0},{1},Found in Morrowind.bsa".format(md5, rest)) |
27 | 27 | if md5 in tribunal_md5: |
28 | 28 | beth_counter += 1 |
29 | | - print "Found in Tribunal.bsa", md5, file_name |
| 29 | + print("{0},{1},Found in Tribunal.bsa".format(md5, rest)) |
30 | 30 | if md5 in bloodmoon_md5: |
31 | 31 | beth_counter += 1 |
32 | | - print "Found in Bloodmoon.bsa", md5, file_name |
| 32 | + print("{0},{1},Found in Bloodmoon.bsa".format(md5, rest)) |
33 | 33 |
|
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)) |
35 | 36 |
|
36 | 37 |
|
37 | 38 | # uixr files |
38 | 39 | uixr_md5 = None |
39 | | -with open("UIX.manifest", 'r') as content_file: |
| 40 | +with open("Manifests/UIXR.manifest", 'r') as content_file: |
40 | 41 | uix_md5 = content_file.read() |
41 | 42 | validate(uix_md5) |
42 | 43 |
|
0 commit comments