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.2.tar.gz
(838.3 kB
view hashes)
Built Distributions
nod-1.2.2-cp39-cp39-win_amd64.whl
(768.2 kB
view hashes)
nod-1.2.2-cp38-cp38-win_amd64.whl
(768.3 kB
view hashes)
nod-1.2.2-cp37-cp37m-win_amd64.whl
(767.3 kB
view hashes)
nod-1.2.2-cp36-cp36m-win_amd64.whl
(767.3 kB
view hashes)
Close
Hashes for nod-1.2.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f66f123e1c8806aad044d7800dc284c3e468b00558cc0a9b404970cdfd7ab12f |
|
MD5 | 7252c104fb88c2753324303633d0ac4c |
|
BLAKE2b-256 | 39c918fe78ee333c35838dcf654343260a7deb2d8b1876c90d8d2a316f050259 |
Close
Hashes for nod-1.2.2-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fa01b676b68dbfc0bc575e67918b3e14a602e532b02b3995cf3a72038a3ae69 |
|
MD5 | 021ed80985466b74ade00b7fca840a66 |
|
BLAKE2b-256 | c06fe59b6c5f216d48a4529b9e205096f0e55b666413d528ba7a061ebce494e6 |
Close
Hashes for nod-1.2.2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c843bb85fca9d61679f6700d33c0b22ef56be9309c8823bfbba873efbece4e3 |
|
MD5 | 2ee0b2251a57532ef2eba9262c95b2d4 |
|
BLAKE2b-256 | 37549f190c435de1e671e92cd599024f02f1dd8f7348533a66dd2fb2e57b89f3 |
Close
Hashes for nod-1.2.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b1e9fb24669c9ea9ea56f90ebc96e5dc779881c817f78a12a1a07a5383a0724 |
|
MD5 | 42076de9248a06dc83b0b36e0ba9b09d |
|
BLAKE2b-256 | 4ac20afe785333a68cfebda55ceebe3f6213500d00c2da657987fb0e2c7e5a1d |
Close
Hashes for nod-1.2.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9fa4a0af7443f8aec0e3156d7349bd646748cb7549e88a7aece5e3a11057801 |
|
MD5 | f5e18fc62f2398a2c9e8cbd3fc74bca4 |
|
BLAKE2b-256 | 0ccdc64118b2906e863a6ed8daaa3e535d8cd65ebfd0a368081bcc6b56e00d8f |
Close
Hashes for nod-1.2.2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e479acc72130ba8cc0d92f0a82b9f94e1df4b7922e9187d901125c84c8402f47 |
|
MD5 | 4b7970979d8e119d133c02017661f690 |
|
BLAKE2b-256 | 58198a63c46ed74c4ef08af7c86d5662a030b9bc0e7c1aba968738cbefe249c1 |
Close
Hashes for nod-1.2.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f5d6315bc1c947438c77c37eb8582dae6fec85577a656ccaa8ce8b58f3fc742 |
|
MD5 | d3a2eeb306dc9c0004f18d1f8680437e |
|
BLAKE2b-256 | 477194dcface39a26410e34849c18bdd73e756401b6a77dc92baabc4dc0e15f7 |
Close
Hashes for nod-1.2.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66ede682568a46fe639b706114d6bdba131ceed8b0829a53d9e4e95187505e6a |
|
MD5 | ab1ea11f8f50cafccb417956c7d95c2b |
|
BLAKE2b-256 | 3a3b227c71fcd5f141bb051acdb8e7fb4c684176605ebe5ca4b9bd2206f14475 |
Close
Hashes for nod-1.2.2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f9e0c2ca13b7c14feb77ade196668d37b41e976e54bf2fe5aaa7f64366bc6aa |
|
MD5 | e76b8d66b01a3e05978fc456b632051e |
|
BLAKE2b-256 | 2f284eb5f76cf0a0692d38b18bfc9ac36cce4a413e500be144e0fd27ad7c2b77 |
Close
Hashes for nod-1.2.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8782a8664c801f187141f6986fb5f6ee1081cd228878690cff19821444624491 |
|
MD5 | 5fa6392e19343db1d62247fff246bf9c |
|
BLAKE2b-256 | 4818b84d60000db5ec95363b3b4f257890f15fbd3d87ae63a6fe542ad8a843af |
Close
Hashes for nod-1.2.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ead97ba2953a7ebe1a9fc6e78c46f71331ee465ae382ca9b72195ec7d55fd7bd |
|
MD5 | 29d24133896f21ee194c5969ba7b6ef5 |
|
BLAKE2b-256 | 55779e771a0a8b4e8c307741c3cfcf9bbdf06863b62633f9a5e8c55d7ebcbe3d |
Close
Hashes for nod-1.2.2-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d068db16a078bd6d314973aa024896065402e1cbe5d10ef13fb18f380ad233f2 |
|
MD5 | eafb0f734888ada2b18c239758f4aee9 |
|
BLAKE2b-256 | 5aa2f88ddd17d7c84a38d89befc114d90fb65fd911793113d9924f50978fbace |