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.4.0.tar.gz
(1.0 MB
view hashes)
Built Distributions
nod-1.4.0-cp39-cp39-win_amd64.whl
(15.0 MB
view hashes)
nod-1.4.0-cp38-cp38-win_amd64.whl
(15.0 MB
view hashes)
Close
Hashes for nod-1.4.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 724420106cabbb114e25df95fe01885f146d89425d24a62fc27fe1495c5daaf3 |
|
MD5 | 449656f1235a595b36989bf16223abef |
|
BLAKE2b-256 | 79a471cad09352b3225ca49841dfc6d17d8871ccdd7c2385504c06350a35a543 |
Close
Hashes for nod-1.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7974630da252586e14edec1a7eec60aa561d38a0c9f02b668aec0d2e621feb6c |
|
MD5 | cc4a6cd69bbf166b39123505c8775d45 |
|
BLAKE2b-256 | 08dec9e34198e18950bd797e1b26e48f5ae0654940e737ebe9299cc0c4f0bcab |
Close
Hashes for nod-1.4.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a5c72999fd1c690b920f72befe22b81516222d20fe185d1262f53994f8760dc |
|
MD5 | aaff679c6749675b84f8cbbe0353e32d |
|
BLAKE2b-256 | 7c15b445951135b332e9025c346f453125aedad26679066322ef7706aacf741f |
Close
Hashes for nod-1.4.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 693ac5c46100ae6b7cddeccb1b831a24af6d878700028dc6f1f7fb181c9671f9 |
|
MD5 | e8965e3f4b2dffb7553a4d3216452103 |
|
BLAKE2b-256 | 5873286105bc8cf66e0e0849e9bcdd40ecee3901c259bcf66d3c6ae17319e90c |
Close
Hashes for nod-1.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0beee0442fd35176f963499266c564a924802dd53542209657992a3978d70068 |
|
MD5 | a37b4e1d89bc3af7f4297eff3595e28a |
|
BLAKE2b-256 | bf041995c07d9f84fb555dd856391c351efdcdeff07caa6e053cd1ff64220ee0 |
Close
Hashes for nod-1.4.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 904302e9b7037ba8d265186d07a9f04319f181a4f272d760b11f709a87fd065f |
|
MD5 | 77fd67f465493b9951040a67008c2617 |
|
BLAKE2b-256 | 4a478ac875269704e3f12b364714a0651e2afe5ca1c4eea965b79c23ca5b7801 |
Close
Hashes for nod-1.4.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49ee2039cba4415afa203ad4d3e37b3e8bee057f1ef36066c2ea71f046dae895 |
|
MD5 | da37117d7583302ea2152c530b50d9d9 |
|
BLAKE2b-256 | 14b85d7120b5cfefb7668240840a2f3d68e9a710c9cf51ff0b5df1b177be9003 |
Close
Hashes for nod-1.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17ba91e45859b398f0fb9b32b10fc095bebc5944205edb9d027020de4c5fda28 |
|
MD5 | 1aea77a9ef368c190a22d17f1a6dac6a |
|
BLAKE2b-256 | 08e89d9efa1955f019eb91c571bdd956a579fc3db42fd41418b89281dacc09a7 |
Close
Hashes for nod-1.4.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7be222f3f112c330754525470f623a5428d105ca44733959c32a87e59eadb59c |
|
MD5 | 65e7ce8db3dbb9ccff208570bccf9cf8 |
|
BLAKE2b-256 | 4a1f1104c0159e6183ccd0e98b7aae19822c6b1678784647a22f232dd1f6a33d |
Close
Hashes for nod-1.4.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f07db74b09742fae3577f72fcb63f046b1e72a60f5275231110cb80bd2807819 |
|
MD5 | 9bd3cdde623e2ed34df78c18a63ebc2d |
|
BLAKE2b-256 | 2d3c99c630a6f4e508775b0fc612e4274e69d295df91da29b4744d83394b98cc |
Close
Hashes for nod-1.4.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59bba25f69d642067fcdb390a6ba4670ca2a3041093a15c2cd766d59d0abbdcb |
|
MD5 | 047cabb39f6be5ce9d901c1298ea77eb |
|
BLAKE2b-256 | dcab2aa573c9ad58fd46b582fcd9f18a049bf1a08a60af804de7fcc10191445e |
Close
Hashes for nod-1.4.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0cf248e7925f9c420217e5534856c619d573504d9302ae5a8d8c05e17e06aad |
|
MD5 | 912f70d2fcaa4251440dded8f4b2a930 |
|
BLAKE2b-256 | 55387e331a54c81f56cb725543ac643e2c5d9b8277f9a00fdfc1725fffe7abd1 |