{"id":15735234,"url":"https://github.com/krisvers/koml2struct","last_synced_at":"2025-03-13T06:31:56.989Z","repository":{"id":189436926,"uuid":"680679828","full_name":"krisvers/koml2struct","owner":"krisvers","description":"krisvers (not-so) Obvious Minimal Language C struct code-gen tool written in C99.","archived":false,"fork":false,"pushed_at":"2023-08-20T17:31:49.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T19:06:30.442Z","etag":null,"topics":["c","c-struct","c99","code-gen","koml","markup-language","no-dependencies"],"latest_commit_sha":null,"homepage":"https://github.com/krisvers/koml2struct","language":"C","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/krisvers.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":"2023-08-20T03:31:21.000Z","updated_at":"2023-08-27T19:09:48.000Z","dependencies_parsed_at":"2023-08-20T04:23:40.963Z","dependency_job_id":"e6f1371d-a43d-4f47-b273-141710ea818f","html_url":"https://github.com/krisvers/koml2struct","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"b42a423944e983cb7cbd71acf19953939b0e8515"},"previous_names":["krisvers/koml2struct"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisvers%2Fkoml2struct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisvers%2Fkoml2struct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisvers%2Fkoml2struct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisvers%2Fkoml2struct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krisvers","download_url":"https://codeload.github.com/krisvers/koml2struct/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243357684,"owners_count":20277988,"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":["c","c-struct","c99","code-gen","koml","markup-language","no-dependencies"],"created_at":"2024-10-04T01:11:10.161Z","updated_at":"2025-03-13T06:31:56.482Z","avatar_url":"https://github.com/krisvers.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koml2struct\nkrisvers' (not-so) Obvious Markup Language C struct code-gen tool written in C99.\n\n### Dependencies\nA functional libc and compiler that at least supports C99\n\n### Usage (in CLI)\n`koml2struct ./test.koml`\n\nor\n\n`koml2struct ./test.koml \u003e test.h`\n\n### KOML example\n[test.koml](./test.koml)\n```md\n# comment\n# `i` specifies `int` type\ni integer = 2\n# `f` specifies `float` type\nf floating = 6.2\n# `s` specifies `char *` type\ns string = \"hello, world\"\n# `b` specifies a bool, `char` type\nb boolean = t\n\n# a header is directly proportional to a struct\n# brackets (`[`, `]`) start and end a \"header\" name\n# if the \"header\" is empty, the struct is anonymous\n[structure]\n  i integer = 2\n  f floating = 6.2\n  s string = \"hello, world\"\n  b boolean = t\n  # `-` specifies the struct instance name if any\n-structure_instance\n```\n#### outputted C code\n```c\nstruct test_kml { /* # comment */ /* # `i` specifies `int` type */ int integer; /* # `f` specifies `float` type */ float floating; /* # `s` specifies `char *` type */ char * string; /* # `b` specifies a bool, `char` type */ char boolean; /* # a header is directly proportional to a struct */ /* # brackets (`[`, `]`) start and end a \"header\" name */ /* # if the \"header\" is empty, the struct is anonymous */ struct structure { int integer; float floating; char * string; char boolean; /* # `-` specifies the struct instance name if any */ } structure_instance; };\n```\n#### outputted C code (now with formatting for readabilitiy\n```c\nstruct test_kml {\n  /* # comment */\n  /* # `i` specifies `int` type */\n  int integer;\n\n  /* # `f` specifies `float` type */\n  float floating;\n\n  /* # `s` specifies `char *` type */\n  char * string;\n\n  /* # `b` specifies a bool, `char` type */\n  char boolean;\n\n  /* # a header is directly proportional to a struct */\n  /* # brackets (`[`, `]`) start and end a \"header\" name */\n  /* # if the \"header\" is empty, the struct is anonymous */\n  struct structure {\n    int integer;\n    float floating;\n    char * string;\n    char boolean;\n\n    /* # `-` specifies the struct instance name if any */\n  } structure_instance;\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrisvers%2Fkoml2struct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrisvers%2Fkoml2struct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrisvers%2Fkoml2struct/lists"}