Last active
January 14, 2019 11:10
-
-
Save kieranjol/266157baf875bb4ad8130ffd393cdff3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
source = sys.argv[1] | |
with open(source, 'r') as fo: | |
lines = fo.readlines() | |
for index, line in enumerate(lines): | |
if 'Source Checksums' in line: | |
if 'N/A' not in line: | |
checksum = line[-34:].rsplit()[0] | |
folder = lines[index +1 ].split()[-1].split('\\')[-2].replace('\n', '') | |
filename = lines[index +1 ].split()[-1].split('\\')[-1].replace('\n', '') | |
print '%s %s' % (checksum, os.path.join(folder, filename)) |
Hey, so this is probably line 11 I'd imagine - but i'd need to test it out properly to figure it out. silly error.
Yup, twas line 11, i changed it from 32 to 34.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tested this out a bit last week.
the new manifest created is missing two characters at the front of every hash. So 30 characters instead of 32 and always the first 2. From spot-checking by eye the rest of the 30 character hashes match up to the 32 character hashes that i created when the material arrived.
I cant see myself what would need to be corrected in the script here. Can you take a look?
cheers