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.1.1.tar.gz
(115.9 kB
view hashes)
Built Distributions
nod-1.1.1-cp37-cp37m-win_amd64.whl
(396.1 kB
view hashes)
nod-1.1.1-cp36-cp36m-win_amd64.whl
(396.2 kB
view hashes)
Close
Hashes for nod-1.1.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 820848a2e3ac1e39a215f33c73c8c5863d06cd9faff3267d2d733f8d8c130321 |
|
MD5 | 31ae75b27f1ac88063d7e0762d7b42ad |
|
BLAKE2b-256 | 41c16bf1c83ab60da407433b9cca86ef2a512824612c0e55bd84d362ac31f883 |
Close
Hashes for nod-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55fd8b54d7e9dc97b38cb27da7d1ecf3ef92266c98feedee2aab3c41f130cc80 |
|
MD5 | 33d99bd3bc7762e19bdbcaf5d59f494a |
|
BLAKE2b-256 | b5dab2ab96bf69a2b522aa72a7bc78c870b981c2f3500c4b1c7ae282e4c3a35b |
Close
Hashes for nod-1.1.1-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4636c6f41576a053735dbc233aabb1a9147470899cf3a9a7252274e985ab56a |
|
MD5 | 87971b476d08397347feaeca89550d7b |
|
BLAKE2b-256 | c7127ea979bba5de3d4baf89ded450846f0ae3be0c0cf7014d8633d43f72e3c9 |
Close
Hashes for nod-1.1.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8af82c91dcbdea5bfd66ae2524c5744149a1272a9e87c19137d55223768b3e08 |
|
MD5 | d2a08ac101836220957533a031c99af4 |
|
BLAKE2b-256 | 6ca9525361ae1c753a8de829549bb7cc29649133eabebb6e9826d5847c1043d3 |
Close
Hashes for nod-1.1.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fcb4b3a96cb3015b83a22e49945217fd2a8adb02df740bfe8c930e5089ccdda |
|
MD5 | 0c9373b1ac16074d35de8336d3c1da16 |
|
BLAKE2b-256 | f19b0f666f5c236239f595904c77bdc60fc2a883e9a2ae88eb94e348cea57c9c |
Close
Hashes for nod-1.1.1-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8a5c6280d8664658d10e90c166ce197a251817c9ae8eea191f7833bea693da7 |
|
MD5 | e56a936481f6b8cd09d437750054189b |
|
BLAKE2b-256 | 6551e30377bfe09fc48f37c8e78d85dd4ae52d16c5c46ee578717f0c64fee111 |
Close
Hashes for nod-1.1.1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 928f5cb421608b79e717013cbf822cadd412a99fe4ae4162131125d925074450 |
|
MD5 | bcd34432f08949aaab3540624a2a8366 |
|
BLAKE2b-256 | d11cecf33b5d38b77d73ebad3da0fb3dec90b7af2db0564073bf4df50fc3d5f0 |