Sign In To Proceed 2c2a

Don't have an ? 5d95n

osu! to create your own !
forum

Osu Skin Compressor.py help needed 26j2t

posted
Total Posts
3
Topic Starter
RavenTope
I wanna make a python file to just open the file and the skin automatically gets put into a zip file, opens it... now the problem is when the file is opened, the skin is all messed up. can someone please help me fix my code?

import zipfile
import pathlib
import os

directory_to_zip = "RavenTope HDDT"
zip_path = "RavenTope HDDT.osk"


folder = pathlib.Path(directory_to_zip)

with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zip:
for file in folder.iterdir():
zip.write(file, arcname=file.name)

os.startfile(zip_path)
Blushing
What do you mean the skin folder gets all messed up?

Can you include screenshots of the before skin folder and then a screenshot of the .zip folder it creates?
Fujiya
Yeah, needed more information, but just curious — why do that in the first place? Why not just use some archiving software? Isn't that easier than writing a Python script that you have to look up and edit every time (I assume because of the hard-coded skin name)? And most importantly: did you ask ChatGPT? It's great for simple Python tasks...
Please sign in to reply.

New reply 6z2l60