Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A library for parsing CSL styles.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

typst/citationberg

Repository files navigation

Crates.ioDocumentationBuild status

Dinkelberg meme: Dad from the TV show The Fairly Odd Parents exclaiming Citationberg

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.

Safety

This crate forbids unsafe code.

License

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-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors8

Languages


[8]ページ先頭

©2009-2025 Movatter.jp