{"id":28465139,"url":"https://github.com/maxverwiebe/py_gma_reader","last_synced_at":"2025-06-30T19:32:03.445Z","repository":{"id":234434738,"uuid":"788889149","full_name":"maxverwiebe/py_gma_reader","owner":"maxverwiebe","description":"Reading and extracting Garry's Mod Addon (GMA) files. It provides an easy-to-use interface to access metadata and extract the contents of GMA files.","archived":false,"fork":false,"pushed_at":"2024-05-13T12:47:18.000Z","size":10,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-07T05:11:30.798Z","etag":null,"topics":["garrysmod","gmad","gmodaddon"],"latest_commit_sha":null,"homepage":"","language":"Python","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/maxverwiebe.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":"2024-04-19T09:33:14.000Z","updated_at":"2025-06-06T22:49:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc677ba0-23ac-406a-be1b-3c83f907418e","html_url":"https://github.com/maxverwiebe/py_gma_reader","commit_stats":null,"previous_names":["maxverwiebe/py_gma_reader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxverwiebe/py_gma_reader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxverwiebe%2Fpy_gma_reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxverwiebe%2Fpy_gma_reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxverwiebe%2Fpy_gma_reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxverwiebe%2Fpy_gma_reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxverwiebe","download_url":"https://codeload.github.com/maxverwiebe/py_gma_reader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxverwiebe%2Fpy_gma_reader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262838213,"owners_count":23372488,"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":["garrysmod","gmad","gmodaddon"],"created_at":"2025-06-07T05:10:56.876Z","updated_at":"2025-06-30T19:32:03.430Z","avatar_url":"https://github.com/maxverwiebe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py_gma_reader\n\npy_gma_reader is a Python library for reading and extracting Garry's Mod Addon (GMA) files. It provides an easy-to-use interface to access metadata and extract the contents of GMA files.\n\n## Features\n\n- Read metadata from GMA files, including:\n  - Addon name\n  - Author\n  - Description\n  - Addon type\n  - Tags\n  - Version\n  - File list\n- Extract the contents of a GMA file to a specified directory\n- Concurrent file extraction for improved performance\n\n## Installation\n\nClone this repo.\n\n## Usage\n\nHere's a simple example of how to use py_gma_reader:\n\n```python\nfrom py_gma_reader import AddonReader\n\nfile_path = \"path/to/addon.gma\"\nwith open(file_path, \"rb\") as file:\n    reader = AddonReader(file)\n    addon = reader.parse_addon()\n    \n    print(addon)  # Print addon metadata\n    \n    extraction_path = \"path/to/extraction/directory\"\n    addon.extract_files(extraction_path)  # Extract addon files\n```\n\n\n## API\n\n### `AddonReader`\n\nThe `AddonReader` class is the main entry point for reading GMA files. It takes a file-like object as input and provides methods to parse the addon metadata and extract the files.\n\n#### Methods\n\n- `parse_addon()`: Parses the GMA file and returns a `GModAddon` object containing the addon metadata and file list.\n\n### `GModAddon`\n\nThe `GModAddon` class represents a Garry's Mod addon and provides access to its metadata and file list.\n\n#### Attributes\n\n- `name`: The name of the addon.\n- `author`: The author of the addon.\n- `description`: The description of the addon.\n- `addon_type`: The type of the addon (e.g., gamemode, map, weapon).\n- `tags`: A list of tags associated with the addon.\n- `version`: The version of the addon.\n- `files`: A list of `AddonFile` objects representing the files in the addon.\n\n#### Methods\n\n- `extract_files(destination)`: Extracts the files of the addon to the specified destination directory.\n\n### `AddonFile`\n\nThe `AddonFile` class represents a file within a Garry's Mod addon.\n\n#### Attributes\n\n- `file_id`: The unique identifier of the file.\n- `name`: The name of the file.\n- `size`: The size of the file in bytes.\n- `crc`: The CRC checksum of the file.\n- `offset`: The offset of the file within the GMA file.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxverwiebe%2Fpy_gma_reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxverwiebe%2Fpy_gma_reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxverwiebe%2Fpy_gma_reader/lists"}