Created
March 28, 2022 03:19
-
-
Save chr15m/ee5b7f011c6219753fb25513d1f27e55 to your computer and use it in GitHub Desktop.
Extract channel names from xm or it files saved with modplug tracker
This file contains 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
from sys import argv | |
f = open(argv[1], "rb").read() | |
i = f.index(bytearray("CNAM", "utf8")) | |
for n in range(3): | |
x = f[i+n*20+8:i+n*20+28].decode("utf8") | |
print(n, x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment