comicinfo (0.1.1)
Installation
[registry]
default = "forgejo"
[registries.forgejo]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = truecargo add comicinfo@0.1.1About this package
A rust crate to parse bare ComicInfo xml files.
comicinfo
A tiny Rust crate to parse ComicInfo.xml files.
Installation
Once available on crates.io, use cargo to add this to your project.
There are no feature flags.
cargo add comicinfo
Usage
The default version for the comicinfo spec is 2.1 (Draft), which is probably what you want.
use comicinfo::ComicInfo; // refers to the default version
let xml = std::fs::read_to_string("ComicInfo.xml")?;
let comicinfo = ComicInfo::from_str(&xml)?;
println!("Series: {}", info.series.unwrap_or_default());
Otherwise, import a specific version of the spec
use comicinfo::v2_0::ComicInfo; // explicitly use version 2.0
let xml = std::fs::read_to_string("ComicInfo.xml")?;
let comicinfo = ComicInfo::from_str(&xml)?;
println!("Series: {}", info.series.unwrap_or_default());
Dependencies
We depend on serde with the derive feature flag, and serde-xml-rs to make serde available for xml files.
Dependencies
| ID | Version |
|---|---|
| serde | ^1.0.228 |
| serde-xml-rs | ^0.8.2 |
Keywords
xml
comicinfo
comics
manga
Details
Assets (1)
Versions (3)
View all
comicinfo-0.1.1.crate
10 KiB