Add json extractor

This commit is contained in:
2026-03-16 09:53:32 -07:00
parent 979fbb9b0d
commit 1d90306408
2 changed files with 95 additions and 0 deletions

View File

@@ -18,6 +18,9 @@ pub use exif::*;
mod pdf;
pub use pdf::*;
mod json;
pub use json::*;
mod toml;
use pile_config::Label;
pub use toml::*;
@@ -66,6 +69,10 @@ impl ItemExtractor {
Label::new("pdf").unwrap(),
PileValue::ObjectExtractor(Arc::new(PdfExtractor::new(item))),
),
(
Label::new("json").unwrap(),
PileValue::ObjectExtractor(Arc::new(JsonExtractor::new(item))),
),
(
Label::new("toml").unwrap(),
PileValue::ObjectExtractor(Arc::new(TomlExtractor::new(item))),
@@ -101,6 +108,7 @@ impl ObjectExtractor for ItemExtractor {
Label::new("epub").unwrap(),
Label::new("exif").unwrap(),
Label::new("pdf").unwrap(),
Label::new("json").unwrap(),
Label::new("sidecar").unwrap(),
]);
}