mirror of
https://github.com/NinjaCheetah/WiiPy.git
synced 2026-02-17 02:25:39 -05:00
Add new ASH module based on libWiiPy main
This commit is contained in:
23
modules/ash.py
Normal file
23
modules/ash.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# "ash.py" from WiiPy by NinjaCheetah
|
||||
# https://github.com/NinjaCheetah/WiiPy
|
||||
|
||||
import os
|
||||
import libWiiPy
|
||||
|
||||
|
||||
def decompress_ash(in_file: str, out_file: str = None):
|
||||
if not os.path.isfile(in_file):
|
||||
raise FileNotFoundError(in_file)
|
||||
|
||||
ash_file = open(in_file, "rb")
|
||||
ash_data = ash_file.read()
|
||||
ash_file.close()
|
||||
|
||||
ash_decompressed = libWiiPy.archive.decompress_ash(ash_data)
|
||||
|
||||
if out_file is None:
|
||||
out_file = in_file + ".arc"
|
||||
|
||||
ash_out = open(out_file, "wb")
|
||||
ash_out.write(ash_decompressed)
|
||||
ash_out.close()
|
||||
@@ -1,5 +1,5 @@
|
||||
# "nus.py" from libWiiPy-cli by NinjaCheetah
|
||||
# https://github.com/NinjaCheetah/libWiiPy-cli
|
||||
# "nus.py" from WiiPy by NinjaCheetah
|
||||
# https://github.com/NinjaCheetah/WiiPy
|
||||
|
||||
import libWiiPy
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# "u8.py" from libWiiPy-cli by NinjaCheetah
|
||||
# https://github.com/NinjaCheetah/libWiiPy-cli
|
||||
# "u8.py" from WiiPy by NinjaCheetah
|
||||
# https://github.com/NinjaCheetah/WiiPy
|
||||
|
||||
import os
|
||||
import libWiiPy
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# "wad.py" from libWiiPy-cli by NinjaCheetah
|
||||
# https://github.com/NinjaCheetah/libWiiPy-cli
|
||||
# "wad.py" from WiiPy by NinjaCheetah
|
||||
# https://github.com/NinjaCheetah/WiiPy
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
|
||||
Reference in New Issue
Block a user