![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,799
Rep Power: 5
![]() |
Wow you're good! :p
That bmp would be the loading art associated with the beginning of the note chart. I'll have to check out those programs. This should help A LOT. Any idea how those programs work? Thanks! @_@ |
|
|
|
|
|
#12 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,799
Rep Power: 5
![]() |
I'd have to say I've had a great deal of success thanks to your guidance andros! Thank-you!
I've got it so it can extract and save the loading art as a png, as well as extract some usefull attributes from the song. import Image
def load_ojn(sid):
dat = open("Music/o2ma%s.ojn"%sid,"rb").read()
def get(i):
r = ''
while ord(dat[i]) > 0:
r += dat[i]
i += 1
return r
# INFO
song = get(108)
comp = get(172)
manu = get(204)
#confirm with , sid = get(236).split('.')[0][4:]
# RATINGS
easy = str(ord(dat[20]))
norm = str(ord(dat[22]))
hard = str(ord(dat[24]))
# THUMB
ascii = ''.join(map(chr, [255, 216, 255, 224]))
if "BM6K" in dat:
thumb = "BM6K"+dat.split("BM6K")[-1]
ext = 'bmp'
elif "BM8K" in dat:
thumb = "BM8K"+dat.split("BM8K")[-1]
ext = 'bmp'
elif ascii in dat:
thumb = ascii+dat.split(ascii)[-1]
ext = 'jpg'
file = open("thumbs/temp.%s"%ext, "wb")
file.write(thumb)
file.close()
im = Image.open("thumbs/temp.%s"%ext)
name = ''.join(['',x][(ord(x)>64 and ord(x)<91) or (ord(x)>47 and ord(x)<58)] for x in song.upper())
im.save("thumbs/%s.png"%name, "PNG")
# return [sid, song, comp, manu, easy, norm, hard]At least it was able to do this to the site for me: http://jammersbase.ath.cx/notices =) Now all that's left is to extract the notes. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|