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.2.0.tar.gz
(823.8 kB
view hashes)
Built Distributions
nod-1.2.0-cp38-cp38-win_amd64.whl
(681.8 kB
view hashes)
nod-1.2.0-cp37-cp37m-win_amd64.whl
(681.4 kB
view hashes)
nod-1.2.0-cp36-cp36m-win_amd64.whl
(681.6 kB
view hashes)
Close
Hashes for nod-1.2.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f718405a862c6d3b258d1a0a658eaa9b99380162a048986aebc42f40ce694835 |
|
MD5 | 977c0ab4d2df5140aa895ea886e2036f |
|
BLAKE2b-256 | 6d9c6763b402cd6842d3d26204b0bbd494c3c075773ab9902ccbe214ce7e1333 |
Close
Hashes for nod-1.2.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50747eaea02a47413eff928658854670a740199d13fd298588edf45ede5a3d56 |
|
MD5 | 4743081e114c084fd2c4de2dd14b4fa7 |
|
BLAKE2b-256 | 1989f3101b6e2ef2de63eb3c615622bd3d55315d1f39283a842ecb3dd1a1b20c |
Close
Hashes for nod-1.2.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 030d8d4ab26f9a8a30d5603058600859be16c6b076bdf6e349173448875d5bd2 |
|
MD5 | f3e27dce7dae927b05c7d741addac2ac |
|
BLAKE2b-256 | a6e916f180fefbe7b344c8edea5481c113c2395ceed975dc502145bb81716cb7 |
Close
Hashes for nod-1.2.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3712cbbb144f0c8251fe44597063f7c668a1492bf002d09e03a9f94378f79893 |
|
MD5 | 8ed04bd0aa645cba5ad362dacf46cef6 |
|
BLAKE2b-256 | f7299d89d4aee7a6d3f04e69aa8065387642832affd119d82421ac158aa2228e |
Close
Hashes for nod-1.2.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9308d325fff2be36bb0d913e045544b47ff71d9993b554e30f6377fd71ce1edb |
|
MD5 | e66e55c8119de4be08a3a686770711d5 |
|
BLAKE2b-256 | aae3b21bf2e1e182781de8cabddf69d5b9716ddece379d24a8ddca783e2ff092 |
Close
Hashes for nod-1.2.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 417fa0c556cd24e813d399000d7bcf5bd4e4f1d649dc6f83559a0eb07ffafbe5 |
|
MD5 | b558459c8fe66b956ee2191388829086 |
|
BLAKE2b-256 | 50bcd8ef4208770c8b99ff1f2447dd311f4936c733960550e2286a1e41335f89 |
Close
Hashes for nod-1.2.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c05d957a918350f8abaf449dcfd6005a4db890d8a617ffca014c5a296b00dad6 |
|
MD5 | d34c482abc25c3b2c67a4f3f70b56eb0 |
|
BLAKE2b-256 | de0eedb810287899e893c9d19c0b802be71c757d7d2ce2c910040ffd4532b31b |
Close
Hashes for nod-1.2.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b36cfb4bd02c9f56816dd4ff94c2eac41602ecb71a0f7c9a27d6f4ba4d602fa7 |
|
MD5 | 241c87a9db7e6aabe0afae1a8189870e |
|
BLAKE2b-256 | a8e68322f370d90e035f64d49da737a8a3926903765f87655d93879229266019 |
Close
Hashes for nod-1.2.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c20af24e0efa3eb408808bdd198acfd4cb34585f37af2f6a2d06c6f73c80a80 |
|
MD5 | 131196cad9caa178846dab65e25ecd0b |
|
BLAKE2b-256 | f6794efd4f623f0ee470ade7c39a4c1df8120fc949a996858d41e80a2429a006 |
Close
Hashes for nod-1.2.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0521fbc648b7ccec5c3b0171513d8e71824c2770cde5dcd8ca93861934573587 |
|
MD5 | be24412918dd20b52941681e653e1fae |
|
BLAKE2b-256 | 8ef331cab12cead9b54dd98730a2bdf747519faad611cc2c7044d7a712bede7c |