Python bindings for the nod library.
Project description
py-nod
Python 3.6 bindings for the NOD, a library for traversing, dumping, and authoring GameCube and Wii optical disc images.
Usage
Unpacking
import nod
def progress_callback(path, progress):
if args.verbose:
print("Extraction {:.0%} Complete; Current node: {}".format(progress, path))
context = nod.ExtractionContext()
context.set_progress_callback(progress_callback)
try:
disc, is_wii = nod.open_disc_from_image("game.iso")
data_partition = disc.get_data_partition()
if not data_partition:
raise RuntimeError("Could not find a data partition in the disc.")
data_partition.extract_to_directory("dir_out", context)
except RuntimeError as e:
raise Exception("Could not extract disc at 'game.iso' to 'dir_out': {}".format(e))
Packing
import nod
if nod.DiscBuilderGCN.calculate_total_size_required("dir_out") == -1:
raise Exception("Image built with given directory would pass the maximum size.")
def fprogress_callback(progress: float, name: str, bytes: int):
print("\r" + " " * 100, end="")
print("\r{:.0%} {} {} B".format(progress, name, bytes), flush=True)
disc_builder = nod.DiscBuilderGCN("game.iso", fprogress_callback)
try:
disc_builder.build_from_directory("dir_out")
except RuntimeError as e:
raise Exception("Failure building the image: {}".format(e))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nod-1.0.2.tar.gz
(112.1 kB
view details)
Built Distributions
nod-1.0.2-cp37-cp37m-win_amd64.whl
(390.6 kB
view details)
nod-1.0.2-cp36-cp36m-win_amd64.whl
(390.7 kB
view details)
File details
Details for the file nod-1.0.2.tar.gz
.
File metadata
- Download URL: nod-1.0.2.tar.gz
- Upload date:
- Size: 112.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1662ed06c0dffd934d3079cfc80d0b531ef354cca8dd40d564cbc99236339c73 |
|
MD5 | 004aae1cea1f90e5f0a9f72407e8e4a6 |
|
BLAKE2b-256 | 97dbe9dcf17f9662149e5782cb535adb6541589031f0703182d7fe3471147f52 |
File details
Details for the file nod-1.0.2-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: nod-1.0.2-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 390.6 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1b1ddac12bc17b0aec7f19da353f9a510f42123f2dddc260637c03c538d2cd |
|
MD5 | 15bbf78997654120c4eccfa6f8b2c088 |
|
BLAKE2b-256 | 26490de107c05cf4d93c93ba6e6cd4f5372fa2161a5d8fec967a9ea485600228 |
File details
Details for the file nod-1.0.2-cp37-cp37m-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: nod-1.0.2-cp37-cp37m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 272.9 kB
- Tags: CPython 3.7m, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4813d562828d8f7b89229143531f68ea990a7c1304c544128774c8d4a1d507f |
|
MD5 | ceefa7f7c2517a645cfbcb6bbced0338 |
|
BLAKE2b-256 | dda48e8d4d992f0e5dbc490142d98a0db722bcb56144d89effbcc517195f2f0d |
File details
Details for the file nod-1.0.2-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: nod-1.0.2-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 390.7 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ca97e985ea9990ddb1de4a8f64b940782f8bbad18b9dd8385fbd346e84ff1a9 |
|
MD5 | a11dfc51b8bcf767142dfc34f9db8f81 |
|
BLAKE2b-256 | d5a3f1cd069edd2ef3977526708983d7fc9e8eda396e8d0b0b3b5375eab6d177 |
File details
Details for the file nod-1.0.2-cp36-cp36m-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: nod-1.0.2-cp36-cp36m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 273.7 kB
- Tags: CPython 3.6m, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95d9fdeb5e695b49d810442e7268f68e086c59d1a0b92072605430aa88b5e3f7 |
|
MD5 | 7edc82086bafbb45907ec0483f9bdbdd |
|
BLAKE2b-256 | 0af6cffa3a535ff9e64361b8bb34295c52f5459791b3c90d45e64996ce5f83c0 |