{"id":40859369,"url":"https://github.com/microhod/magma_output_parser","last_synced_at":"2026-01-22T00:06:35.247Z","repository":{"id":245593982,"uuid":"818700319","full_name":"microhod/magma_output_parser","owner":"microhod","description":"Parser for magma group output files","archived":false,"fork":false,"pushed_at":"2025-06-07T09:30:40.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T10:26:11.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/microhod.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,"zenodo":null}},"created_at":"2024-06-22T15:48:32.000Z","updated_at":"2025-06-07T09:30:44.000Z","dependencies_parsed_at":"2025-06-07T10:32:43.690Z","dependency_job_id":null,"html_url":"https://github.com/microhod/magma_output_parser","commit_stats":null,"previous_names":["microhod/magma_output_parser"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/microhod/magma_output_parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microhod%2Fmagma_output_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microhod%2Fmagma_output_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microhod%2Fmagma_output_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microhod%2Fmagma_output_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microhod","download_url":"https://codeload.github.com/microhod/magma_output_parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microhod%2Fmagma_output_parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28647513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-22T00:06:35.173Z","updated_at":"2026-01-22T00:06:35.238Z","avatar_url":"https://github.com/microhod.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.12520164.svg)](https://doi.org/10.5281/zenodo.12520164)\n\n# Magma Output File Parser\n\nThis repo implements a parser for group record outputs from the computational algebra program [Magma](http://magma.maths.usyd.edu.au/magma/).\n\n⚠️ This repo is experimential and not particularly generic, it's not meant as a parser for ANY form of magma output (although the grammar may provide a decent starting point for this so feel free to fork).\n\nThis repo provides:\n\n* [magma_parser](./magma_parser/) a module for parsing magma group output files (see [tests/testdata](./tests/testdata/) for examples of the file structures it supports).\n  * This was designed to not fit too tightly to only my usecase so it might be a useful reference for others. If there's any interest it could be broken out into a separate package.\n* [magma.py](./magma.py) a script to parse a magma file and export to a CSV or Excel Spreadsheet (this is quite specific to my usecase so might not be of much use to anyone else)\n\n## Running the script\n\nInstall requirements with [pip](https://pip.pypa.io/en/stable/) (use a [virtualenv](https://virtualenv.pypa.io/en/latest/) if you like them):\n\n```shell\npip install -r requirements.txt\n```\n\nThen run the script.\n\n```shell\npython3 magma.py '[INPUT_FILE]' '[OUTPUT_DIRECTORY]' '[WRITER=csv|xlsx]'\n```\n\nDefaults:\n\n* `OUTPUT_DIRECTORY`: the current directory\n* `WRITER`: `xlsx`\n\n## `magma_parser`\n\nThe parser is implemented using [ANTLR](https://www.antlr.org/), which allows us to describe the structure of the files in a [formal grammar](https://en.wikipedia.org/wiki/Formal_grammar) and have the parser generated automatically.\n\nThe grammar files are stored in the [magma_parser/grammar](./magma_parser/grammar/) directory. For developing these, it can be useful to have the `antlr4-parse` CLI tool, which can be installed from `dev-requirements.txt`\n\n```shell\npip install -r requirements-dev.txt\n```\n\n### Updating the generated files\n\nFrom the [magma_parser](./magma_parser/) directory, just run [build.sh](./magma_parser/build.sh) to regenerate the generated parser files after a grammar change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrohod%2Fmagma_output_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrohod%2Fmagma_output_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrohod%2Fmagma_output_parser/lists"}