Python bindings for the nod library.
Project description
py-nod
Python 3.8 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.9.1.tar.gz
(1.0 MB
view hashes)
Built Distributions
Close
Hashes for nod-1.9.1-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c3a885384301fe408ab9d602da2ca8161ea566ebc8ca5077b6ae20acda3caea |
|
MD5 | a565ede4f3cfb93e6e0b38197b68714e |
|
BLAKE2b-256 | 67204ca799e551a16b7046906e4429c22b19d21398fcee9a4577d761da42a1d4 |
Close
Hashes for nod-1.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 040afe4adde981cad140475ed4e376185b59030325c6af6d04a2c651b65bff30 |
|
MD5 | 3f9a5db9d9cd4fa30a9d5642415ff1ca |
|
BLAKE2b-256 | 77526539b3c557a49f47d748346375d4cc682e11aeab0b764a0dab0c3f63d6d3 |
Close
Hashes for nod-1.9.1-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8399ec71505a41610c4063748b823c93447c58d0cb163aef993e6630036fc2b7 |
|
MD5 | 0aaf9faebc74362203883d6b1877b2d4 |
|
BLAKE2b-256 | e46458c53887d46d316e560ff28dbff8d5b0a23788e1fd9ec357f80596301ad9 |
Close
Hashes for nod-1.9.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f211a0b4f95f300d3e68cb5c38a82d61df913d075583233da6c1597e259d69d0 |
|
MD5 | 723377af8467ac3f47f7f17577aac096 |
|
BLAKE2b-256 | 3e14725316d946e58ab72ffe2f87b1684cb01b6a6661746e38fac5814b957f36 |
Close
Hashes for nod-1.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d2002a1a8aa9bdf4574899e365b1f816fae0069cca78547fc7ed52d36c3d92c |
|
MD5 | 5b7eb1d4d3565ccd86db69f1b8163aa8 |
|
BLAKE2b-256 | d2b64429863c5e8670a922ca84585b73eae5d816442644a5545bfe27527fea57 |
Close
Hashes for nod-1.9.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f08e91d7fb0e3950d23c6a72cd3a4fb8f47f9d6f2b2cdafed101f81221e8054a |
|
MD5 | 9a0f6687025536b4dc10f429378a14d6 |
|
BLAKE2b-256 | 9897a0e1084c0dede968f73987718542cfbd4bfa4aa37b628ec50fde8771ab39 |
Close
Hashes for nod-1.9.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6533046fcdc0be09717e728c97567e49eb1463907568d247a2ab8e93d109816c |
|
MD5 | 85b53b82bb5c13108ef92a8eeefb8d18 |
|
BLAKE2b-256 | 79799ac7d2abfd462e78a03969f45d4a113b4b7e08e5254a21ddec75b69476e1 |
Close
Hashes for nod-1.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f638d024e4a972c242d655ea5b3a2a6f5d89e859961e3f6edca4b774c67a2456 |
|
MD5 | e9cc1a293c34fcf5af59c90da7970a5c |
|
BLAKE2b-256 | 53ba7bbdb9de8d880b3f90294b9d209a82218b3a46e9b4e193f952d0c101d1a0 |
Close
Hashes for nod-1.9.1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbd3b812b93473814513e55f770408b7031bf68dc3063e057dc219c4ae86fdc5 |
|
MD5 | e72f9c2776132521ce0cc26f4d96e21c |
|
BLAKE2b-256 | 0ab8934010d8a2a2d35d009ed6b9795c388ac69d7e61e1c3dd26213382b75621 |
Close
Hashes for nod-1.9.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6466c47f82da02f5e132e19bfe3230d6b651480580eb5f6878de1fa448b21b2 |
|
MD5 | 13fd085534cb1a6a9c2ee46cd7fa53fb |
|
BLAKE2b-256 | ec5ba786d4dffed3adf30737e4b08b593132d9b5d6e1e3b504bce0a200ea1785 |
Close
Hashes for nod-1.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be85b88d1fde9f93c585dd99e8212cac9811ab1d7ebcc83564a96a823f1bf62a |
|
MD5 | 620c9e804aca13949ab96af77521ca31 |
|
BLAKE2b-256 | 5147958b49f02aa68927b2929e8d0824d910dbd9ed7e43fc147a950111ecc752 |
Close
Hashes for nod-1.9.1-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b32e1b028cd897423b874b05101325672e82f3b41600698c929c49ecdfa8c2d |
|
MD5 | 602d192857305c66c25710403edcd853 |
|
BLAKE2b-256 | 40c086ca6f910de9107562ac328bea8da94adf448119f83cf8b05c724064daca |
Close
Hashes for nod-1.9.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a84415107fec6c96af3104d5bd8c43cacd7c49aca333139dd6c789d368541925 |
|
MD5 | 3956c9fdb02c7d6df6e7f0be25f598ec |
|
BLAKE2b-256 | 80eff4ac0605c796dd11b47509efe19f86de0be70faeef4812ba00b1cea964e7 |
Close
Hashes for nod-1.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6a74cba9c8839a92d115c6f69770889ec98480642ce1b2d75160260c4d21d22 |
|
MD5 | f6ec44f226e32ee3e43d7cb13c080c14 |
|
BLAKE2b-256 | b29d8f17bea51e4626612d0472a2dc20cc2d1d98d257c7521457c31adfb957a8 |
Close
Hashes for nod-1.9.1-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47c03705700d0ef47c97b5b01683f0f7b03f4aacb63382fc10c62060a326d5bd |
|
MD5 | deb7c279a3b13403e9755931e67a50af |
|
BLAKE2b-256 | 54a6a9c48f41d8e2a984a33f774314c001aeb3dd68a4d97a475b43c100ea6d42 |