{"id":19269137,"url":"https://github.com/typst/citationberg","last_synced_at":"2025-10-26T13:40:32.225Z","repository":{"id":171910414,"uuid":"648587820","full_name":"typst/citationberg","owner":"typst","description":"A library for parsing CSL styles.","archived":false,"fork":false,"pushed_at":"2025-03-07T21:44:10.000Z","size":255,"stargazers_count":41,"open_issues_count":2,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-03T21:12:08.079Z","etag":null,"topics":["bibliography","citation-style-language","citations","csl","xml"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/typst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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-06-02T10:17:16.000Z","updated_at":"2025-03-21T01:03:58.000Z","dependencies_parsed_at":"2023-10-17T00:03:22.624Z","dependency_job_id":"2cf4c46d-f48c-466d-a183-d5f0c1a93671","html_url":"https://github.com/typst/citationberg","commit_stats":null,"previous_names":["typst/citationberg"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typst%2Fcitationberg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typst%2Fcitationberg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typst%2Fcitationberg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typst%2Fcitationberg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typst","download_url":"https://codeload.github.com/typst/citationberg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248599295,"owners_count":21131257,"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":["bibliography","citation-style-language","citations","csl","xml"],"created_at":"2024-11-09T20:18:38.751Z","updated_at":"2025-10-26T13:40:32.214Z","avatar_url":"https://github.com/typst.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Citationberg\n\n[![Crates.io](https://img.shields.io/crates/v/citationberg.svg)](https://crates.io/crates/citationberg)\n[![Documentation](https://docs.rs/citationberg/badge.svg)](https://docs.rs/citationberg)\n[![Build status](https://github.com/typst/citationberg/workflows/Continuous%20integration/badge.svg)](https://github.com/typst/citationberg/actions)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Dinkelberg meme: Dad from the TV show The Fairly Odd Parents exclaiming Citationberg\" src=\"https://github.com/typst/citationberg/blob/main/assets/citationberg.png?raw=true\" width=\"426\"\u003e\n\u003c/p\u003e\n\nA library for parsing CSL styles.\n\n```toml\n[dependencies]\ncitationberg = \"0.6\"\n```\n\nCitationberg deserializes CSL styles from XML into Rust structs. It supports\n[CSL 1.0.2](https://docs.citationstyles.org/en/stable/specification.html).\n\nThis crate is not a CSL processor, so you are free to choose whatever data model\nand data types you need for your bibliographic needs. If you need to render\ncitations, you can use [Hayagriva](https://github.com/typst/hayagriva) which\nuses this crate under the hood.\n\nParse your style like this:\n\n```rust\nuse std::fs;\nuse citationberg::Style;\n\nlet string = fs::read_to_string(\"tests/independent/ieee.csl\")?;\nlet style = citationberg::Style::from_xml(\u0026string)?;\n\nlet Style::Independent(independent) = style else {\n    panic!(\"IEEE is an independent style\");\n};\n\nassert_eq!(independent.info.title.value, \"IEEE\");\n```\n\nBe sure to check out the CSL\n[styles](https://github.com/citation-style-language/styles) and\n[locales](https://github.com/citation-style-language/locales) repositories into\nsibling folders of `citationberg` if you want to run the tests.\n\n## Safety\nThis crate forbids unsafe code.\n\n## License\nThis crate is dual-licensed under the MIT and Apache 2.0 licenses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypst%2Fcitationberg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypst%2Fcitationberg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypst%2Fcitationberg/lists"}