comicinfo (0.1.2)
Installation
[registry]
default = "forgejo"
[registries.forgejo]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = truecargo add comicinfo@0.1.2About 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: cargo add comicinfo
There are no feature flags.
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());
Please see the examples on the docs site for more details.
Dependencies
We depend on serde with the derive feature flag, and serde-xml-rs to make serde available for xml files. Internally we use indexset for collections on ComicInfo objects, and have a macro that requires paste to generate setters/getters and convenience methods. For property testing we need something that can generate random stuff, so we use rand.
Dependencies
| ID | Version |
|---|---|
| indexmap | ^2.12.1 |
| paste | ^1.0.15 |
| serde | ^1.0.228 |
| serde-xml-rs | ^0.8.2 |
| urlencoding | ^2.1.3 |
| rand | ^0.9.2 |
Keywords
xml
comicinfo
comics
manga
Details
2025-11-30 21:43:52 +01:00
Assets (1)
Versions (3)
View all
Cargo
3
Daniel Barenholz <spam@dbarenholz.com>
MIT
40 KiB
comicinfo-0.1.2.crate
40 KiB