{"id":20032700,"url":"https://github.com/lucko/commodore-file","last_synced_at":"2025-05-05T05:30:46.697Z","repository":{"id":55608054,"uuid":"282497820","full_name":"lucko/commodore-file","owner":"lucko","description":"The commodore file format","archived":false,"fork":false,"pushed_at":"2020-12-18T11:53:39.000Z","size":14,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T17:10:28.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/lucko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-25T18:01:07.000Z","updated_at":"2023-08-28T02:34:35.000Z","dependencies_parsed_at":"2022-08-15T04:20:17.354Z","dependency_job_id":null,"html_url":"https://github.com/lucko/commodore-file","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/lucko%2Fcommodore-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fcommodore-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fcommodore-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fcommodore-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucko","download_url":"https://codeload.github.com/lucko/commodore-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252445676,"owners_count":21749096,"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-11-13T09:38:50.724Z","updated_at":"2025-05-05T05:30:46.470Z","avatar_url":"https://github.com/lucko.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# commodore-file  [![Javadocs](https://javadoc.io/badge/me.lucko/commodore-file.svg)](https://javadoc.io/doc/me.lucko/commodore-file) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/me.lucko/commodore-file/badge.svg)](https://maven-badges.herokuapp.com/maven-central/me.lucko/commodore-file)\n\nThe commodore file format is a simplified way of representing Brigadier command node trees in a string form.\n\nThis repository is a Java parser for the format.\n\n## Example\nBelow is an example commodore file for [Minecraft's `/time` command](https://minecraft.gamepedia.com/Commands/time):\n\n```\ntime {\n  set {\n    day;\n    noon;\n    night;\n    midnight;\n    time brigadier:integer;\n  }\n  add {\n    time brigadier:integer;\n  }\n  query {\n    daytime;\n    gametime;\n    day;\n  }\n}\n```\n\nTo parse to a brigadier `CommandNode`:\n\n```java\nLiteralCommandNode\u003cSender\u003e timeCommand = CommodoreFileReader.INSTANCE.parse(new File(\"time.commodore\"));\n```\n\nThis will return a command node equivalent to the following node as build with brigadier's API.\n\n```java\nLiteralCommandNode\u003cSender\u003e timeCommand = LiteralArgumentBuilder.literal(\"time\")\n        .then(LiteralArgumentBuilder.literal(\"set\")\n                .then(LiteralArgumentBuilder.literal(\"day\"))\n                .then(LiteralArgumentBuilder.literal(\"noon\"))\n                .then(LiteralArgumentBuilder.literal(\"night\"))\n                .then(LiteralArgumentBuilder.literal(\"midnight\"))\n                .then(RequiredArgumentBuilder.argument(\"time\", IntegerArgumentType.integer())))\n        .then(LiteralArgumentBuilder.literal(\"add\")\n                .then(RequiredArgumentBuilder.argument(\"time\", IntegerArgumentType.integer())))\n        .then(LiteralArgumentBuilder.literal(\"query\")\n                .then(LiteralArgumentBuilder.literal(\"daytime\"))\n                .then(LiteralArgumentBuilder.literal(\"gametime\"))\n                .then(LiteralArgumentBuilder.literal(\"day\"))\n        ).build();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucko%2Fcommodore-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucko%2Fcommodore-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucko%2Fcommodore-file/lists"}