- Notifications
You must be signed in to change notification settings - Fork10
A library for parsing CSL styles.
License
Apache-2.0, MIT licenses found
Licenses found
Apache-2.0
LICENSE-APACHEMIT
LICENSE-MITNotificationsYou must be signed in to change notification settings
typst/citationberg
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A library for parsing CSL styles.
[dependencies]citationberg ="0.5"
Citationberg deserializes CSL styles from XML into Rust structs. It supportsCSL 1.0.2.
This crate is not a CSL processor, so you are free to choose whatever data modeland data types you need for your bibliographic needs. If you need to rendercitations, you can useHayagriva whichuses this crate under the hood.
Parse your style like this:
use std::fs;use citationberg::Style;let string = fs::read_to_string("tests/independent/ieee.csl")?;let style = citationberg::Style::from_xml(&string)?;letStyle::Independent(independent) = styleelse{panic!("IEEE is an independent style");};assert_eq!(independent.info.title.value,"IEEE");
Be sure to check out the CSLstyles andlocales repositories intosibling folders ofcitationberg
if you want to run the tests.
This crate forbids unsafe code.
This crate is dual-licensed under the MIT and Apache 2.0 licenses.
About
A library for parsing CSL styles.
Topics
Resources
License
Apache-2.0, MIT licenses found
Licenses found
Apache-2.0
LICENSE-APACHEMIT
LICENSE-MITStars
Watchers
Forks
Packages0
No packages published