Add json extractor
This commit is contained in:
@@ -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(),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user