{"id":50591303,"url":"https://github.com/thechampagne/bibtex.h","last_synced_at":"2026-06-05T10:30:42.099Z","repository":{"id":326947566,"uuid":"1107102000","full_name":"thechampagne/bibtex.h","owner":"thechampagne","description":"A single-file header-only library to parse BibTeX.","archived":false,"fork":false,"pushed_at":"2025-12-02T21:41:52.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-04T07:23:38.393Z","etag":null,"topics":["bibtex","bibtexparser","c","library","parser"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thechampagne.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-30T15:28:48.000Z","updated_at":"2025-12-02T21:41:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/thechampagne/bibtex.h","commit_stats":null,"previous_names":["thechampagne/bibtex.h"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thechampagne/bibtex.h","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechampagne%2Fbibtex.h","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechampagne%2Fbibtex.h/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechampagne%2Fbibtex.h/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechampagne%2Fbibtex.h/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thechampagne","download_url":"https://codeload.github.com/thechampagne/bibtex.h/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechampagne%2Fbibtex.h/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33939226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bibtex","bibtexparser","c","library","parser"],"created_at":"2026-06-05T10:30:41.325Z","updated_at":"2026-06-05T10:30:42.085Z","avatar_url":"https://github.com/thechampagne.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bibtex.h\n\nA single-file header-only library to parse [BibTeX](https://en.wikipedia.org/wiki/BibTeX).\n\n## How to use\n\n`example.c`:\n```c\n#define BIBTEX_IMPLEMENTATION\n#include \"bibtex.h\"\n\nint main(void)\n{\n  const char* input =\n    \"@book{knuth1986,author=\\\"Donald E. Knuth\\\",title=\\\"The TeX Book\\\",year=1986,publisher=\\\"Addison-Wesley\\\"}\"\n    \"@article{example1990,author=\\\"Person\\\",title=\\\"Introduction to Example\\\",journal=\\\"Example Forum\\\",year=1990,}\";\n  bibtex_entry_t* entry;\n  bibtex_error_t error;\n  error = bibtex_parse(\u0026entry, input);\n  if (error.type != BIBTEX_OK) {\n    fprintf(stderr,\"Error at %d:%d: %s\\n\", error.row, error.col, bibtex_strerror(error.type));\n    return 1;\n  }\n  bibtex_entry_t* e = entry;\n  while(e != NULL) {\n    printf(\"@%s{%s,\\n\", bibtex_entry_type_to_string(e-\u003etype), e-\u003ekey);\n    bibtex_field_t* f = e-\u003efields;\n    while(f != NULL) {\n      printf(\"  %s = %s,\\n\", bibtex_field_type_to_string(f-\u003etype), f-\u003evalue);\n      f = f-\u003enext;\n    }\n    printf(\"}\\n\");\n    e = e-\u003enext;\n  }\n  bibtex_entry_free(entry);\n  return 0;\n}\n```\n\n```sh\n$ cc example.c -o example\n$ ./example\n@book{knuth1986,\n  author = Donald E. Knuth,\n  title = The TeX Book,\n  year = 1986,\n  publisher = Addison-Wesley,\n}\n@article{example1990,\n  author = Person,\n  title = Introduction to Example,\n  journal = Example Forum,\n  year = 1990,\n}\n```\n\n## References\n\n- [BibTeX format](https://www.bibtex.com/g/bibtex-format/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthechampagne%2Fbibtex.h","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthechampagne%2Fbibtex.h","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthechampagne%2Fbibtex.h/lists"}