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.1.tar.gz
(826.5 kB
view hashes)
Built Distributions
nod-1.2.1-cp38-cp38-win_amd64.whl
(772.9 kB
view hashes)
nod-1.2.1-cp37-cp37m-win_amd64.whl
(772.3 kB
view hashes)
nod-1.2.1-cp36-cp36m-win_amd64.whl
(772.5 kB
view hashes)
Close
Hashes for nod-1.2.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1fabec3c6392bda1d8e0271c3e3458a0b3264b44328b7dcaed1e588a4a34f07 |
|
MD5 | 56933c4d9cdb990376a1b2667dacbb7a |
|
BLAKE2b-256 | 392edde32dc23bccace0711ea21deac0d041e2ad418a0eee1278b69e37963416 |
Close
Hashes for nod-1.2.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd26f3fd5807f1e46a2162f38ea2b2c69885adba3c67b029926090836dc73ff3 |
|
MD5 | c0c78e929307e3ff7d22d5b4ae8df1da |
|
BLAKE2b-256 | 57fa9360e2d9738186c5d95cca46a867c2011fa46d9a9aff3819969c638d5413 |
Close
Hashes for nod-1.2.1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33e416065f57feb793b47c004e931005d864effd0c2757798c5d153c4b217122 |
|
MD5 | 221ca2138c21a2c854653343c72754ba |
|
BLAKE2b-256 | 04eff2da810a327c383b8f1a1de38076e2596dbecc16ebfdfd3d893210f173da |
Close
Hashes for nod-1.2.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b72c30c8a5f962abe5f596842a4d08102d67984f2bd286fbe66f5dbd57e179ef |
|
MD5 | 3ed079a63e521ff12e54735ad316ca59 |
|
BLAKE2b-256 | 1c2481ace9e568ca8c2617505f5cdda04afa1b219f0d77a37806b00da64381f9 |
Close
Hashes for nod-1.2.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47c769ca3d2b23cd1f402fe3f8d3c7996658dc5bf79516043e23f8e9de5d454e |
|
MD5 | a2cc0e32d0ce479026f5a7af8ad04145 |
|
BLAKE2b-256 | b95c2008fce39f696ab9ec155ddff0134709d4501366566a08ad94cdc78bfa58 |
Close
Hashes for nod-1.2.1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 824fe001608a9b3a4b80ecb84a644bcabd108f35e2289d417646e233af26e37e |
|
MD5 | 8daa405ddbafa39f8676754a47d87867 |
|
BLAKE2b-256 | bf07d1c7149ba869ad693a5ffabf12d859a02107641adf3a62267f3d774dbafc |
Close
Hashes for nod-1.2.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06863bb02470d452958517519a11eaddbaf1d44357a93fe6bf23cfc1f3961126 |
|
MD5 | cb6b0e8861c23d7f5a855fb4f4f0daf4 |
|
BLAKE2b-256 | 5f7eced6d78f43867924735531cd44310b318cedc119e0eb8d919fdc7ad17074 |
Close
Hashes for nod-1.2.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4992e876949c54b39d9c27e2eafaa01a59dc55b2453ff5f17e91a30aa315f1d3 |
|
MD5 | 93712200591435b2ee38efe10feca242 |
|
BLAKE2b-256 | d1fe31e9ffd712ef6bbfe08d055a6f412e240622bcafcf33417a87261d28ae9d |
Close
Hashes for nod-1.2.1-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0012e62a6d13e2be3c465251c59c3915c3a793921063fcb56506a854c65b868b |
|
MD5 | ecdcebe02ff54a1e137462a6da0242cd |
|
BLAKE2b-256 | 6f3fabfb7357616deaf903da0eb434dc5ffbe0b0e62c4adea4db3adb4da321bb |
Close
Hashes for nod-1.2.1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd39824e83b393dd97694f2e67a546361487c53ea5cfb800f7d23b6ce1c388bb |
|
MD5 | f368d3868467d94f2130a3250b1653ce |
|
BLAKE2b-256 | 76468096097d79cd588dd61a45f2a8779141f9dc624c2e502321431d2b741d94 |