{"id":38488777,"url":"https://github.com/gerph/riscos-oslib-parser","last_synced_at":"2026-01-17T05:39:45.413Z","repository":{"id":128876854,"uuid":"304735596","full_name":"gerph/riscos-oslib-parser","owner":"gerph","description":"Parser for OSLib def files.","archived":false,"fork":false,"pushed_at":"2026-01-11T04:59:25.000Z","size":101,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T09:27:10.491Z","etag":null,"topics":["riscos"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gerph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["gerph"]}},"created_at":"2020-10-16T20:47:40.000Z","updated_at":"2026-01-11T01:39:51.000Z","dependencies_parsed_at":"2025-03-11T00:20:24.561Z","dependency_job_id":"26bf8218-0f0d-4b06-af14-b69d24442730","html_url":"https://github.com/gerph/riscos-oslib-parser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/gerph/riscos-oslib-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerph%2Friscos-oslib-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerph%2Friscos-oslib-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerph%2Friscos-oslib-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerph%2Friscos-oslib-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gerph","download_url":"https://codeload.github.com/gerph/riscos-oslib-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerph%2Friscos-oslib-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28500603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["riscos"],"created_at":"2026-01-17T05:39:45.321Z","updated_at":"2026-01-17T05:39:45.398Z","avatar_url":"https://github.com/gerph.png","language":"Python","funding_links":["https://github.com/sponsors/gerph"],"categories":[],"sub_categories":[],"readme":"# OSLib def file parser\n\n## Introduction\n\nThis repository contains a parser for the RISC OS [OSLib](http://ro-oslib.sourceforge.net/) API header file format ('def' files).\nOSLib provides interfaces for the system calls used by RISC OS, in a type safe and structured manner.\nAs such, it's a great source of information and a means for building API interfaces.\n\nOSLib is supplied with a parser for these files which can generate a number of interfaces, and documentation formats.\nHowever, it does not make it easy to target other languages or purposes.\n\nThe `oslib_parser.py` module was written to fill a particular need - that of extracting the meaning from entry and exit register mappings for SWIs.\nIt was written organically to parse the structures in the def files, as they were encountered.\nAs such, it is not complete, not may it be accurate.\n\nIt is, however, sufficient to meet the original requirement of generating SWI register mappings, and has been used to create interface definitions for RISC OS pyromaniac.\n\n## Generating files\n\nThe tool uses Jinja2 templates to generate the source and API files.\nThere are 4 different types of file that can be generated with the parser:\n\n* SWI conditions (`--swi-conditions FILE`): Generates a Python file containing SWI entry and exit details.\n* PyModule template (`--create-pymodule-template FILE`): Generates a Python PyModule for use with RISC OS Pyromaniac.\n* Python constants (`--create-pymodule-constants FILE`): Generate a Python file containing constants for the module.\n* Pyromaniac API template (`--create-api-template FILE`): Generate a Pyromaniac API method for the module.\n* C module templates (`--create-module-cmhg-template` and `--create-module-c-template`): Generate sources for a C module veneer template.\n\n## Usage\n\nMultiple 'def' files can be parsed by the command, but only a single file will be output for each generator.\n\nFor example, to create an API definition for the URL module interfaces:\n\n```\n./oslib_parser.py --create-api-template url.py ../../oslib/User/def/url\n```\n\nAdding the `-debug` option will show the structures as they are parsed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgerph%2Friscos-oslib-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgerph%2Friscos-oslib-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgerph%2Friscos-oslib-parser/lists"}