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.7.0.tar.gz
(1.0 MB
view hashes)
Built Distributions
nod-1.7.0-cp39-cp39-win_amd64.whl
(16.4 MB
view hashes)
nod-1.7.0-cp38-cp38-win_amd64.whl
(16.4 MB
view hashes)
Close
Hashes for nod-1.7.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb6496d9c6510138bd8fc3d2342653060945c915bea813ccd88d9f602bbfa1e5 |
|
MD5 | dcd86f5b12c6c482d19d8bf8243d7872 |
|
BLAKE2b-256 | 40b25b0686002213dd69a31324c2c98e403d3f00afa3ff790b9148d23752dbbf |
Close
Hashes for nod-1.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4676fd599745ffb19bf7a3d762b6af271d29f785ad7571bcfa963d313122e221 |
|
MD5 | 45a40f8813b3f357ca8d2c2e5e8ada3a |
|
BLAKE2b-256 | d80b2ca17dcfb663ef0a29ea54fcb854fe45ad1d233580b1d2b4b93053e001af |
Close
Hashes for nod-1.7.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e74267240debc258eb5e0e96df43af1562cbb5db2cf25140ff645a6e10d8dc52 |
|
MD5 | 95e03f5504bbbe6b998f9b9ea9f16282 |
|
BLAKE2b-256 | dd6c2a338a2655b414d0e47fabe255803d21e34137ee0f6c21710556806ab423 |
Close
Hashes for nod-1.7.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 665ff141bc5201bdee0977ebc0dac4022762456caa58d2b2c07c852538c95fee |
|
MD5 | d2722372ecd2febe99a7531ec659a31d |
|
BLAKE2b-256 | 518ee45287d010210335e9a00b54fef8ed001f799196ee4fd8a673b74dd3fdef |
Close
Hashes for nod-1.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b33957478d600fd01e8fc3df9ddb1b8aa5045743c1ae0e8e72401143c5083206 |
|
MD5 | 1d4fd02209b5b2992c983ee0d133d05c |
|
BLAKE2b-256 | 123e2d190c41190107a1537d55c898aa5ff0fd3b50031de54e3f71aa8ba3b33c |
Close
Hashes for nod-1.7.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cb7d1ccc4e024e73e6c68d908658eefd868afe965176d8bdacfc005d4a0ce24 |
|
MD5 | 8e42bf301cf0b8ad8a5667408f64daff |
|
BLAKE2b-256 | 154b0db9e22b1bf0ed90b7a6b7a748548e4344131ba20a036c761fafdc3533b8 |
Close
Hashes for nod-1.7.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b449a827056f880b0527b80a0edbe2980df5481610dac6dbd665d53bfd9f5e88 |
|
MD5 | eba1c209953aa5ff41b358c2983a35db |
|
BLAKE2b-256 | 80db9ed25eb50eed30e241bbed88600fe79706b06c085bb48cae5bc2e5b090bb |
Close
Hashes for nod-1.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eceaed87fe572be8fc6176c9f5ebc7d72f8509ecd5866982ba19e1f0356d36d |
|
MD5 | 0491cf3c45dbf2b4e717664c08e49cc7 |
|
BLAKE2b-256 | 09fb9019c6219be391b04f7c76ee6337f78c11914860e14a8da93ab5da9ae976 |
Close
Hashes for nod-1.7.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 267f0a08b13439d1d971b78108cb5691b574ab25ba608e1a848e86259b2d72e3 |
|
MD5 | 87ea4f866c58cf66c4447c03f9c35cc7 |
|
BLAKE2b-256 | 5dd557007a3ab1f2789ff98dda84d9878597feb857eeb73662f56a3ae925487e |
Close
Hashes for nod-1.7.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1927259cac67c6a3a2666c4bae51ecf51b18e853dc898cb190e1c95c30ee6ea |
|
MD5 | 62718520c7f1be2b9368b8bf5f0cc8b1 |
|
BLAKE2b-256 | cc3b6bbad44224a743e9b63fe11ba0a3eb11725827719607954a76b04e3bb595 |
Close
Hashes for nod-1.7.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 330c22073a83bc6a9abd63efae0fddfe7d5e300bb5ce709520ed2f817cb81404 |
|
MD5 | 953f8d2e0203a952e3b0c154cc8692c2 |
|
BLAKE2b-256 | 8d1369a8e5ec5d6d95db80574b89dd3f8c078b99650cb7cf5a929bb21d5b4407 |
Close
Hashes for nod-1.7.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdd2afa2f38c916de3efb8c503a294c797caae9fde4b12947df8d7caa0200159 |
|
MD5 | f22f9b6d745e476fb583bd3e196ca08e |
|
BLAKE2b-256 | a2f8f28fa3771f6f76b6a417607ed26e92f60b9cd4f2d92b593e326c94483c80 |