Skip to content

Instantly share code, notes, and snippets.

@ariscop
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ariscop/43d8140a642979d6aac0 to your computer and use it in GitHub Desktop.
Save ariscop/43d8140a642979d6aac0 to your computer and use it in GitHub Desktop.
USDX-WP song hash thingy
#!/usr/bin/env python3
import sys
from hashlib import md5
from re import split
with open(sys.argv[1], "rb") as f:
data = b"".join(x for x in split(b"[\r\n]+", f.read()) if not x.startswith(b"#"))
m = md5()
m.update(data)
print(m.hexdigest())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment