fgaddon utilities
aircraft_updates.py - list updated aircraft in fgaddon between two date points. Useful for release notes. find_md5file.py - identify identical files based on md5sum. Useful for finding license infringement.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os, sys, re, fnmatch
|
||||
import hashlib, glob
|
||||
|
||||
|
||||
def md5(fname):
|
||||
hash_md5 = hashlib.md5()
|
||||
with open(fname, "rb") as f:
|
||||
for chunk in iter(lambda: f.read(4096), b""):
|
||||
hash_md5.update(chunk)
|
||||
return hash_md5.hexdigest()
|
||||
|
||||
|
||||
filepath = sys.argv[1]
|
||||
searchpath = sys.argv[2]
|
||||
|
||||
digest = md5(filepath)
|
||||
print("Checking for " + digest)
|
||||
|
||||
wavfiles = glob.glob(searchpath + "/**/*.wav", recursive=True)
|
||||
|
||||
for f in wavfiles:
|
||||
if (md5(f) == digest):
|
||||
print(f)
|
||||
Reference in New Issue
Block a user