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") is None:
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.8.0.tar.gz
(1.0 MB
view hashes)
Built Distributions
nod-1.8.0-cp39-cp39-win_amd64.whl
(14.6 MB
view hashes)
nod-1.8.0-cp38-cp38-win_amd64.whl
(14.6 MB
view hashes)
Close
Hashes for nod-1.8.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f00096db1efaf497beb26e853298373134cb5eaaa8e09973cb6d1d7589472fa6 |
|
MD5 | f665f4b307330e1bfa8dff45e4887848 |
|
BLAKE2b-256 | 0e39ff0e2fa0072217f55daa35983f312fc63d4a0bb3c25db9cdf9e7bce2d3b3 |
Close
Hashes for nod-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b0eb0e035849cfb63d4220b6e31d2d2b57e257f9072299327c5c62b71583a6e |
|
MD5 | e7a2a772b31739f1acd0fae4c0079bb9 |
|
BLAKE2b-256 | d252ecc7853f2cb07bae580a2a65e9709a46ec6578dcdc81f8b958444aaf3471 |
Close
Hashes for nod-1.8.0-cp310-cp310-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e14b324e155bb75cd4763f6c5a7d3cda72c8886c909e629fd4597f12cebd956 |
|
MD5 | 0c1b2d3f45f1fe9aa8454446b542a1c1 |
|
BLAKE2b-256 | 83822eb35818c4432cb1de5a76ebb9af0725ffb1fada62c2d708a02e20ec8d9e |
Close
Hashes for nod-1.8.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 566105d07b82b75d738efa505167223a0d737c27a1702dc11a9385f00a815a3a |
|
MD5 | 08875a5e6fb7ebf09b7949c98cd58ea2 |
|
BLAKE2b-256 | 223a87cc8e6ad51721608a85ad90161530fb55c4bcf399d6c156a0239f9788ce |
Close
Hashes for nod-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15e61de6291ce2e8a16edc7ca8f38cb28eb5cc9a0f4ea844c4cc2f987da69e3c |
|
MD5 | 8d6e203691f7f1b0a78b1731a0616756 |
|
BLAKE2b-256 | 946533db3b8566c182e46dc63e5fb3174a3abb3b9213f9cbb1931ca7094188e7 |
Close
Hashes for nod-1.8.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da7b23ec9fdc17490e35a1a9b5110715fddd47f56e76b62e482683f7f1c43cab |
|
MD5 | 4d825a41a7af44b67af5872f830ef660 |
|
BLAKE2b-256 | 85313c333fc264d368c39e8bc5ba8c62ef8eb0784021c49b31e277d04fe63dc8 |
Close
Hashes for nod-1.8.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca887db96ac59c692b0c7171f43f1b24bdc7471409dd147035967a54b5743f0c |
|
MD5 | dff011de54853762c98bdc16e6d65d47 |
|
BLAKE2b-256 | 661aa91eb633a17f53d1b2f352092da9cca44354ad868b52191fa44971ad79a9 |
Close
Hashes for nod-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67c4824246b57016eb2ca98723bde07528519ca45489260b25bc0380a90c665b |
|
MD5 | c25ac95cbe22accc18b1e31f37047d6c |
|
BLAKE2b-256 | 5232112628bd5f0d8b9d6716d6a937cf8b59b693f4bf0fcd7f940799e0704850 |
Close
Hashes for nod-1.8.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdecd6a6b31be30ef4ec419be61a08fd97c5edcbc73605fbfcdb5536c94e243a |
|
MD5 | 9aa7d32227bfdcac4d3b032658787106 |
|
BLAKE2b-256 | 7312f4593c7768a20ce6da0b2aa9f4a8d7c139eb6914b88e144c0013f3e676ea |
Close
Hashes for nod-1.8.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 933f2ed0ca5707f86a035b330032e37e9c4cd7d98bfdb2a10c5cc979c497b1c3 |
|
MD5 | e1d426c8576ea353394c5b68459d617f |
|
BLAKE2b-256 | c9543209926f00181a56f9d1ea50d07651d6380acfba27e13359d68a38a929a1 |
Close
Hashes for nod-1.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0012ce9fd9eeb64e9d6af4fae42cdb02372fa4d1afcd1b1c1e0e0602c0f4254a |
|
MD5 | fce58026bca5065bc71bb59ca31afb25 |
|
BLAKE2b-256 | ed1d8b65715c92742240da3d8f33219bbec3c9dd1d3c7d9d93e67db179e97386 |
Close
Hashes for nod-1.8.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ca02f1685f1b0b3d0e475bd3b2fefd85287bcabfa66832e3f92c69745942908 |
|
MD5 | a973f5fd39e8fba1a8e939d032aa285f |
|
BLAKE2b-256 | 2c48f49ac855b069d23cec5de604830597d420c3e11f19b4cd3b2b0fee8c77f1 |