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.5.0.tar.gz
(1.0 MB
view hashes)
Built Distributions
nod-1.5.0-cp39-cp39-win_amd64.whl
(15.0 MB
view hashes)
nod-1.5.0-cp38-cp38-win_amd64.whl
(15.0 MB
view hashes)
Close
Hashes for nod-1.5.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c745548978fc423af72db5af1b43eb04e69432e3270d1bf6bf823a06bebb72c6 |
|
MD5 | ba6d8d9c4bdd7b0f1e63ee6863320a5c |
|
BLAKE2b-256 | 3dd781dec672e385db322e506c92423040def450348f18ad03847ffe762d4783 |
Close
Hashes for nod-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 205361bc50a3e5438fe15afa4aa4889a35ef4116810476f957173adfd3ab3101 |
|
MD5 | d96d4c951e63084385f17578196568d8 |
|
BLAKE2b-256 | ef39e074cfb9a04791891591d268d9a6b2f52d258c349dfeb63fc04496a7a516 |
Close
Hashes for nod-1.5.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a559dbdd4824b7acb4191fa43759f0c7a60cb36b00c259c632e86e99bcbcff0c |
|
MD5 | 0033483033d8c15648845c6382c2d80e |
|
BLAKE2b-256 | b7529a095c5193b4e7e5e0b93df5c9acd5efbfaa1c9fba05ec6650a053f476c7 |
Close
Hashes for nod-1.5.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9af2d703a24290724c81fdbc9e6e7b48b75777c0adf00df7ed25941dbb699529 |
|
MD5 | 3ee33b11706bf4a41085c1836926f0d1 |
|
BLAKE2b-256 | 670c26297bb5f375ed9dd74680bd5eef9428cba1ef388504eaeaae4d1cd5199a |
Close
Hashes for nod-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 944d2e485d104f788d17704ffd62afa8d0c2eb47fe7299776bb749e9db95431f |
|
MD5 | 82c975ae952bfec012e2ee10293b2bb5 |
|
BLAKE2b-256 | 3b84d6e8c2316a824da4db1dbb6b82e2720291125776a707711155a53a7c9d13 |
Close
Hashes for nod-1.5.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 761bf1f1896050e4bb379c10347de378dfbbcc98668a13e8adfddcb52c664714 |
|
MD5 | f2bc24b1746d38a9ba85bd1d83732d92 |
|
BLAKE2b-256 | 80ef25d2db7bda8ff9a7606efb68eaf3dd604afe803da34b7fbd1cd77db89bf6 |
Close
Hashes for nod-1.5.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51ce4c192f2eeb9ae38b7de1afdb1d04fd10aaa4dc430005c6f012c3ec5d3d78 |
|
MD5 | 7190e6b39cfb7ef7e0b29fa764a9467e |
|
BLAKE2b-256 | b4ea3944b41231b94fbf55b812d7e0783e3d3422d76c6f0205ec427c98e3ff45 |
Close
Hashes for nod-1.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4246f55cc74834ab094640b94be7c698926e3e6a363cc7fd6fe6525efb66a0f8 |
|
MD5 | b5ac8ab91bc801a6a3f38c9ea6bcc646 |
|
BLAKE2b-256 | dc5feaf1243578ba86e3cbaf7118ad9fe2b9f51c7d7deed6de66a991bd97c419 |
Close
Hashes for nod-1.5.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df6a5e75fca75a0fb97a5e1831aea6357814e98a4ef353ffe2d706b401ffebe7 |
|
MD5 | b7442474c3b76c9ed5e2d15bc711cf73 |
|
BLAKE2b-256 | a12248abab931f94d23a452bf9fe7db7937fbc4485f3cc8a6afb7f02a2aa0a0e |
Close
Hashes for nod-1.5.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f4ff4211eb56b3c14820c343ce8334db330f4bc2eae59c9a61fca1d42cc7034 |
|
MD5 | 738434760ae29931f4263ee00f47056c |
|
BLAKE2b-256 | 71b80b33a3f5fc7b9a7cb9964a68c7c9e812203852d7b915b8de75da44cf7e7e |
Close
Hashes for nod-1.5.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04c4e81bde5c8f0a3ed8efdde9647d62b2860b2ec373fab7fad8192602353da5 |
|
MD5 | 153c77e47a50dc260a48029869ce3dd4 |
|
BLAKE2b-256 | 6d86d3d0572eb385ea18a992c1987a1f83ae78cc867ff705e422521d8a93b257 |
Close
Hashes for nod-1.5.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52ff398ce057160753402267c0d5e293227c3dfaf00a64779490bada082270e0 |
|
MD5 | deecd26b6cde8171de96b23e9a01ffd6 |
|
BLAKE2b-256 | 2238b2beecc40521b92103b138df8c1d01e3fc6af4219e7efa5dd23ceabd240d |