{"id":23803785,"url":"https://github.com/henriquegemignani/py-nod","last_synced_at":"2025-09-06T16:32:36.146Z","repository":{"id":39575243,"uuid":"107798261","full_name":"henriquegemignani/py-nod","owner":"henriquegemignani","description":"Python bindings for NOD, a library for GameCube/Wii optical discs","archived":false,"fork":false,"pushed_at":"2024-12-23T22:20:44.000Z","size":303,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-23T23:25:15.041Z","etag":null,"topics":["cython","game-modding","metroid-prime","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/henriquegemignani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-21T16:54:14.000Z","updated_at":"2024-12-23T22:20:47.000Z","dependencies_parsed_at":"2023-10-03T12:56:01.900Z","dependency_job_id":"1c41c30e-f605-4ca2-8e41-4ccd392075f1","html_url":"https://github.com/henriquegemignani/py-nod","commit_stats":{"total_commits":156,"total_committers":2,"mean_commits":78.0,"dds":0.05769230769230771,"last_synced_commit":"2e72006af95d04fd92e2aac361301189cd427fad"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henriquegemignani%2Fpy-nod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henriquegemignani%2Fpy-nod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henriquegemignani%2Fpy-nod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henriquegemignani%2Fpy-nod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henriquegemignani","download_url":"https://codeload.github.com/henriquegemignani/py-nod/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232133704,"owners_count":18477293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cython","game-modding","metroid-prime","python","python3"],"created_at":"2025-01-01T22:34:08.014Z","updated_at":"2025-01-01T22:34:09.644Z","avatar_url":"https://github.com/henriquegemignani.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py-nod\nPython 3.8 bindings for the [NOD](https://gitlab.axiodl.com/AxioDL/nod), a library for traversing, dumping, and authoring\nGameCube and Wii optical disc images.\n\n\n## Usage\n\n### Unpacking\n```python\nimport nod\n\ndef progress_callback(path, progress):\n    if args.verbose:\n        print(\"Extraction {:.0%} Complete; Current node: {}\".format(progress, path))\n\ncontext = nod.ExtractionContext()\ncontext.set_progress_callback(progress_callback)\n\ntry:\n    disc, is_wii = nod.open_disc_from_image(\"game.iso\")\n    data_partition = disc.get_data_partition()\n    if not data_partition:\n        raise RuntimeError(\"Could not find a data partition in the disc.\")\n    data_partition.extract_to_directory(\"dir_out\", context)\nexcept RuntimeError as e:\n    raise Exception(\"Could not extract disc at 'game.iso' to 'dir_out': {}\".format(e))\n\n```\n\n### Packing\n\n```python\nimport nod\n\nif nod.DiscBuilderGCN.calculate_total_size_required(\"dir_out\") is None:\n    raise Exception(\"Image built with given directory would pass the maximum size.\")\n\ndef fprogress_callback(progress: float, name: str, bytes: int):\n    print(\"\\r\" + \" \" * 100, end=\"\")\n    print(\"\\r{:.0%} {} {} B\".format(progress, name, bytes), flush=True)\n\ndisc_builder = nod.DiscBuilderGCN(\"game.iso\", fprogress_callback)\ntry:\n    disc_builder.build_from_directory(\"dir_out\")    \nexcept RuntimeError as e:\n    raise Exception(\"Failure building the image: {}\".format(e))\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenriquegemignani%2Fpy-nod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenriquegemignani%2Fpy-nod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenriquegemignani%2Fpy-nod/lists"}