{"id":16314674,"url":"https://github.com/angrymane/bb-parser","last_synced_at":"2025-04-26T23:57:06.677Z","repository":{"id":45733121,"uuid":"510003534","full_name":"AngryMane/bb-parser","owner":"AngryMane","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-15T13:54:09.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T23:56:59.606Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AngryMane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-03T11:27:16.000Z","updated_at":"2022-07-11T15:21:11.000Z","dependencies_parsed_at":"2022-07-16T11:16:14.939Z","dependency_job_id":null,"html_url":"https://github.com/AngryMane/bb-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngryMane%2Fbb-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngryMane%2Fbb-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngryMane%2Fbb-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngryMane%2Fbb-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AngryMane","download_url":"https://codeload.github.com/AngryMane/bb-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251068507,"owners_count":21531478,"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":[],"created_at":"2024-10-10T21:54:51.809Z","updated_at":"2025-04-26T23:57:06.628Z","avatar_url":"https://github.com/AngryMane.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bb-parser\n\nThis is a parser for bitbake file. I developed this for the following use-cases.\n\n* parse bitbake with user's own reduce functions\n* paser bitbake without any other bitbake modules\n\nThis paser is based on the official parser, and the official parser's license is [GPL-2.0-only](https://spdx.org/licenses/GPL-2.0-only.html).\n\n* [BBHandler](https://git.yoctoproject.org/poky/tree/bitbake/lib/bb/parse/parse_py/BBHandler.py)\n* [ConfHandler](https://git.yoctoproject.org/poky/tree/bitbake/lib/bb/parse/parse_py/ConfHandler.py)\n\n# Why not official parser?\n\nYou can see the official paser by the following links. These are so greate works!\n\n* [BBHandler](https://git.yoctoproject.org/poky/tree/bitbake/lib/bb/parse/parse_py/BBHandler.py)\n* [ConfHandler](https://git.yoctoproject.org/poky/tree/bitbake/lib/bb/parse/parse_py/ConfHandler.py)\n\nBut for instance, if I want to develop a linter for bitbake file, it's difficult to develop with the official parser because ...\n\n* the official parser doesn't support custom reduce functions. Therefore, user can't customize what to do when specific syntax has come.\n* the official parser is difficult to use without other bitbake modules\n\nAs a work-around for these, I developed bb-paser.\n\n# How to use\n\n1. Download 3-files in bb-perser dir.  \n1. Copy these files into your project.\n1. use like this\n\n    ```\n    from BitbakeParser import BitbakeParser\n    from BitbakeVisitor import BitbakeVisitorBase\n\n    def main() -\u003e None:\n        if len(sys.argv) \u003c 2 or not os.path.isfile(sys.argv[1]):\n            return\n        parser: BitbakeParser = BitbakeParser(BitbakeVisitorBase())\n        parser.parse(sys.argv[1])\n    ```\n    Please note that `BitbakeVisitorBase` is just base class for visitor, so you can create your own visitor class derived on them.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangrymane%2Fbb-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangrymane%2Fbb-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangrymane%2Fbb-parser/lists"}